Preheat the oven to 180°C Fan. Line the loaf tin with baking parchment, making sure the tin is completely covered. It is very important not to miss this step!
Make the Courgette Flan
Slice the courgette and the onions.
Heat a tablespoon of olive oil in a frying pan and add the onions. Fry until translucent but not browned.
Add the sliced courgettes and fry on a medium heat for about 10 minutes or until the courgettes are slightly softened. They should not be too soft or the flan will have no texture, the courgettes need to have a slight bite to them. Season the courgettes and onions with salt and pepper.
When the courgettes have softened, transfer the contents of the frying pan to a colander in the sink. Press down on the vegetables to remove as much liquid as possible.
While the vegetables are cooking, crack 6 eggs into a bowl, add 2 tbsp of cornflour, salt and pepper, and either whisk by hand or use an immersion blender to mix into a smooth batter. If whisking by hand, you may wish to mix the cornflour with a little water before adding to the eggs in order to avoid getting a lumpy batter.
Put the vegetables into the prepared loaf tin and pour over the egg batter.
Bake in the oven for 30 mins. A skewer or knife should come out clean when inserted into the cooked flan.
Leave to cool on the counter and then refrigerate in the tin until serving. This flan is best served cold.
Make the Herb Vinaigrette
A couple of hours before serving, finely chop the shallots and herbs. Add them to a bowl along with the olive oil, lemon juice and seasoning and mix well.
I like to leave the vinaigrette on the counter for an hour or so, so that the flavours of the lemon, olive oil and herbs all mix together.
Remove the flan from the refrigerator and turn it upside down onto a plate. Serve sliced with a generous spoonful of herb vinaigrette on top.