Grate the courgette into a bowl. Squeeze out as much water as you can.
Dice the butternut squash and precook in the microwave with a little water for 3-4 minutes until slightly soft.
Meanwhile, place the dry red lentils in a pan with 450 ml water. Bring to the boil then simmer until all the water has gone. This will take 10-15 minutes. Drain over a sieve to remove all remaining water.
Once the butternut squash and lentils are cooked, put them in the bowl with the courgette.
Add the onion, sweetcorn, eggs, herbs to the bowl and mix well. Season well with salt and pepper.
Pour the mixture into a large silicone cake pan sprayed with spray oil. I used a deep 8 inch pan.
Cook in a preheated oven at 180 degrees C for approximately 40-45 minutes, or until set through (check using a skewer) and the top has gone golden.
Remove from the oven, leave it to cool and it will become more firm. Slice once cooled.