Defrost puff pastry sheets next to each other. Peel onion and cut into thin strips. Wash the rosemary, shake dry and remove the needles. Peel and wash the potatoes and slice or cut them into thin slices.
Heat the oil in a tatin baking tin or an ovenproof pan. Fry the potato slices for approx. 5 minutes, turning them until golden brown. Add onion and rosemary and fry for about 1 minute. Season with salt and pepper.
Sprinkle with sugar and allow to caramelize slightly. Drizzle balsamic vinegar over it and bring to the boil briefly.
Preheat oven (electric cooker: 200 °C/circulating air: 175 °C/gas: see manufacturer). Place puff pastry sheets on top of each other and roll out round (approx. 26 cm Ø) on a floured work surface. Place the puff pastry on the potatoes and fold in any excess pastry.
Prick the dough several times with a fork. Bake in the oven for 20-25 minutes.
Remove the tart and let it cool down a little. Remove from the edge and immediately turn over carefully onto a plate.