Preheat oven to 180 C / Gas 4. Grease a quiche dish or tart tin and lightly dust with flour. Roll out the pastry on a lightly floured surface and line the prepared quiche dish or tart tin, pressing down gently into the base and sides. Cut off any excess pastry and pinch the edges.
Warm the olive oil in a frying pan over a medium heat. Add the onions and cook and stir for 3 to 5 minutes until soft. Stir in the sweetcorn and season with salt and pepper to taste, and cook for another 3 minutes. Transfer to a bowl and stir through both types of cheese.
In a separate bowl, whisk eggs with cream. Add to onions and cheese mixture, and mix well. Pour into the prepared pastry case.
Bake in preheated oven for 45 minutes, until set in centre. Remove from the oven an allow to stand 10 minutes before serving.