Preheat oven at 160 C and grease an oven tray generously with oil.
Start by finely chopping the onion and the leek and sweat it in a pan (fry if you wish) with a little oil a pinch of salt and a good old grind or two of black pepperand a sprinkle of herbs.
Wash all veggies and peel. I personally don't peel the courgettes because I love a bit of colour in there. It looks even prettier ;-)!
In a large bowl grate the root vegetables on the big holes using either a food processor or a manual grater. Mix them all.
In a separate bowl, whisk the eggs, some salt, pepper, cayenne pepper, herbs, the nutmeg (if you choose to put it in) and the flour. Put in the cooked onion and leek and mix it all very well.
Pour the egg mixture over the grated vegetables and stir well all ingredients until they are well incorporated.
Spread the mixture evenly in the oiled oven tray in a layer that is not thicker than 1 cm. If you are left with some put in a separate small oven dish (or a ramekin or two) but there shouldn't be any left really unless the tray quite small.
Place in the preheated oven and cook for about 40 min at 190 C or 180 C if you have a fan assisted oven. If the flan layer is thinner, keep an eye on cooking time as it will cook quicker. It should turn nice and golden.
If you wish to indulge a little sprinkle a bit of cheese on top.;-))