Preheat the oven to gas mark 5, 190°C, fan 170°C. Dust a clean surface with the flour and roll out the puff pastry to make a 20cm (8in) square, about 5mm (¼in) thick. Transfer to a baking sheet and chill for 20 minutes.
Meanwhile, melt the butter in a heatproof 20cm (8in) square tin on the hob, over a medium heat. Stir in the sugar and cinnamon and cook for 3 minutes, stirring until the sugar has dissolved and the mixture turns a light caramel colour.
Carefully arrange the banana halves in a line, nestling them into the caramel, and cook for a further 3 minutes. Drizzle over the vanilla extract and the rum and continue cooking for 1 minute more until the caramel has thickened a little.
Remove from the heat and drape the pastry over the tin, tucking the edges in around the bananas to ensure there are no gaps. Bake in the oven for 30 minutes, until the pastry is puffed and golden, and the caramel sauce is bubbling at the edges.
Remove from the oven and leave to cool in the tin for 5 minutes before turning out. Using a palette knife, loosen the pastry from the edge of the tin then cover with a large serving plate. Invert the tin over the plate, giving it a little shake if needed. Serve with cream or vanilla ice cream, if you like.