Heat the oven to 400°F and arrange a rack in the middle.
Combine the butter, water, sugar, oil, and salt in a medium ovenproof bowl. Place the bowl in the oven and heat until the mixture is bubbling and the butter is just beginning to brown on the edges, about 15 minutes.
Remove the bowl from the oven (handle with care, as it will be hot). Add the flour all at once and stir quickly until it comes together and forms a ball that pulls away from the sides of the bowl.
Transfer the dough to a 9-inch tart pan with a removable base. Let the dough is cool before pressing it into the bottom and sides of the pan. Prick the dough all over with a fork.
Place on a cookie sheet and bake until golden brown, about 15-20 minutes.
To make the filling:
Heat oil in a large skillet over medium heat until hot. Add onions and cook for about 30 minutes or until golden brown, stirring frequently. Set aside.
In a small bowl, whisk together eggs, half and half, salt and pepper. Crumble the cheese onto the cooled caramelized onions then add the egg mixture. Pour onion mixture into tart shell.
Still on the cookie sheet, bake for 33-40 minutes, or until golden brown. Let cool almost completely before serving.