Preheat the oven to 180 C/350 F/Gas 4.
Peel the onions and slice into 2.5cm (1in) slices. Gently fry in a little butter over a medium-to-high heat until the onions begin to colour - approximately 3-5 minutes. Leave to cool.
Wipe the remaining butter around the base of a clean, small, ovenproof frying pan and sprinkle the sugar over the butter. Place the cold, cooked onions on top of the sugar and butter in the pan.
Cut a disc of puff pastry 2cm (¾in) larger in diameter than the pan containing the onions, butter and sugar.
Lay the pastry on top of the onions. The pastry should go up the side of the pan a little way, or over the edges to seal (this will depend on the height of your pan).
Transfer the pan to the fridge and chill for one hour.
Meanwhile, in a separate pan, reduce the balsamic vinegar over a medium-high heat to make a glaze.
Remove the uncooked tart from the fridge and cook in the oven for 10-15 minutes until the pastry is cooked and golden.
To turn out the tart, carefully place a plate over the pan and quickly turn the pan over (you may need to run a knife around the edge). The tart should be onion-side up, so the pastry has become the base.
Place the slices of goats' cheese on top of the tart, and drizzle with the balsamic glaze.