Step 1Heat a large saute pan over medium-low heat. Saute the leeks and onions in the olive oil 30 to 40 minutes until caramelized, occasionally stirring. Remove from heat and cool.
Step 2Meanwhile, in the bowl of a stand mixer (or a mixing bowl), combine the flour, cornstarch and one-fourth teaspoon salt. Add the butter and mix with the paddle attachment (or by hand with a fork) until combined. Add one egg; mix until dough forms.
Step 3On a lightly floured surface, roll the dough out to a 12-inch circle. Place the dough in a 9-inch pie plate and press to remove any air bubbles. Crimp the edges, and refrigerate for 30 minutes.
Step 4While the quiche shell chills, mix the heavy cream and sour cream in a medium bowl. Whisk in the remaining three eggs. Add a pinch each nutmeg, salt and pepper and combine to form a batter.
Step 5Remove the quiche shell from the refrigerator and spread the leek and onion mixture evenly over the base. Sprinkle the ham and then the cheese over the leeks and onions. Pour in the batter and place the quiche in the oven.
Step 6Bake until puffed and golden, about 25 to 30 minutes. Remove from the oven and cool slightly on a rack. Serve warm or at room temperature.