Preheat your oven to 200ºC/180ºC fan-forced. Lightly grease a 3.5cm-deep, 24cm fluted flan tin. Line the tin with pastry, trimming to fit precisely, then chill in the fridge for 20 minutes until firm.
Heat oil in a large frying pan over medium heat. Cook bacon until golden and crisp, about 4 to 5 minutes. Add onion and cook until softened, about 3 minutes. Transfer mixture to a bowl and let it cool for 10 minutes.
Preheat your oven and place a tin on a baking tray. Line the pastry with baking paper and fill it with ceramic pie weights or uncooked rice. Bake for 10 minutes, then remove the paper and weights or rice and continue baking for 5 minutes until it turns light golden.
Take the bacon mixture and gently spoon it into the pastry case. In a bowl, whisk together the cream and eggs until well combined. Carefully pour the cream and egg mixture over the bacon. Sprinkle generously with cheese, then season with salt and pepper. Bake in the oven for 35 to 40 minutes, or until the mixture is fully set. Allow it to stand for 5 minutes before serving. Enjoy your delightful dish!