To caramelise the onions, warm the oil in a frying pan and begin cooking the sliced onion on a low-medium heat with a pinch of salt for around 15 to 20 minutes until golden. Add the balsamic vinegar and sugar and cook for a further 10 minutes on a low heat until sticky and caramelised. Remove from the heat, transfer to a bowl and place in fridge until needed.
Preheat the oven to 180 C / Gas 4.
Place the pastry sheet on a lightly floured surface and roll out further if desired to form a rectangle. Transfer to a baking tray and fold over 1cm of each side and coat with the melted butter. Stab the pastry all over with a fork.
Bake in the preheated oven for 15 minutes. After this you will have to take it out and press down the middle with a fork to release the steam and re-flatten the surface.
Meanwhile in a bowl, combine the cream cheese, mascarpone, lemon zest and black pepper to taste then spread the mixture over the pastry. I usually like to fry up the asparagus for a few minutes to soften but if you prefer firmer asparagus then place it straight on the surface in horizontal strips, filling each gap with the caramelised onion.
Place back in the oven for 15 to 20 minutes, then remove from the oven, sprinkle over the Parmesan cheese and place back in the oven for another 5 minutes or until golden and crispy.