Preheat the oven to 180°C (350°F). Peel and thinly slice 500 grams of onions.
In a large pan, heat 2 tablespoons of oil over medium heat. Add the sliced onions and cook for 20-25 minutes, stirring occasionally, until they are soft and caramelized. Season with salt and pepper to taste.
While the onions are cooking, prepare the pastry crust. In a mixing bowl, combine 200 grams of all-purpose flour, a pinch of salt, and 100 grams of cold, cubed butter. Use your fingertips to rub the butter into the flour until the mixture resembles breadcrumbs.
Add 2-3 tablespoons of cold water to the flour mixture and mix until a dough forms. Roll out the dough on a lightly floured surface and transfer it to a greased 9-inch tart pan. Press the dough into the pan and trim any excess dough from the edges.
Prick the bottom of the pastry crust with a fork and bake in the preheated oven for 10-12 minutes, until it is lightly golden.
In a separate bowl, whisk together 200 ml of fresh cream, 2 large eggs, and salt and pepper to taste.
Remove the pastry crust from the oven and spread the caramelized onions evenly over the base. Pour the cream and egg mixture over the onions.
Bake the tart for 25-30 minutes, or until the filling is set and the crust is golden brown. Allow the tart to cool slightly before slicing and serving.