Preheat the oven to 180C
In a large saucepan, place the onions, sugar, red wine, and vinegar. Allow the mixture to come to the boil and then reduce the heat to low and simmer for about 15 minutes or until most of the liquid has evaporated off and the onion are translucent and a bright red hue colour. Make sure that you stir it occasionally to prevent anything sticking to the base of the saucepan and add a drop of wine if the liquid evaporate before the onions are cooked. Remove from the heat and set aside to cool.
Next, roll out the shortcrust pastry into a large disc. Place the disc on a baking tray. Brush the edges with egg wash and spoon in the red onion marmalade.
Scatter some tomatoes slices and dot over the goat cheese. Sprinkle the sunflowers and Season with a little of black pepper.
Place in the oven and bake for 20-25 minutes or until the pastry is golden brown and the cheese and onion mixture is bubbling.
Serve with some green leaves if desired, warm or at room temperature.