This savory pie layers sweet, slow-cooked caramelized onions with bright basil pesto and a rich, cheesy custard in a buttery pastry crust. It works because the deep, jammy onions balance the herbal punch of the pesto, while the egg-and-cream filling sets into a sliceable, quiche-like texture that holds together beautifully.
Ingredients
- 1 single 9-inch pie crust (homemade or store-bought, unbaked)
- 3 large yellow onions (about 1.5 lb / 680 g), thinly sliced
- 3 tablespoons (45 g) unsalted butter
- 1 tablespoon (15 ml) olive oil
- 1/2 teaspoon salt
- 1/4 teaspoon black pepper
- 1/2 cup (120 ml) basil pesto (store-bought or homemade)
- 4 large eggs
- 1 cup (240 ml) heavy cream
- 1/2 cup (120 ml) whole milk
- 1 cup (100 g) grated Gruyère or Swiss cheese
- 1/2 cup (50 g) grated Parmesan cheese
Instructions
- Preheat your oven to 375°F (190°C). If using a store-bought crust, let it sit at room temperature for 10 minutes per package directions. Press the crust into a 9-inch pie pan, crimp the edges, and place it in the freezer for 15 minutes while you start the onions.
- Heat the butter and olive oil in a large skillet (12-inch) over medium heat. Add the sliced onions, salt, and pepper. Cook, stirring occasionally, for 10 minutes until the onions soften and begin to release their moisture.
- Reduce the heat to medium-low and continue cooking, stirring every 5 minutes, for 35–40 minutes total. The onions should turn deep golden brown and reduce to about 1 cup. If they start to stick or burn, add a tablespoon of water to deglaze the pan. Remove from heat and let cool for 10 minutes.
- While the onions cool, blind-bake the crust. Line the frozen crust with parchment paper and fill with pie weights or dried beans. Bake for 15 minutes, then remove the paper and weights, and bake for another 5–7 minutes until the crust looks dry and lightly golden. Set aside to cool slightly.
- In a medium bowl, whisk the eggs, heavy cream, and milk until fully combined. Stir in the Gruyère and Parmesan.
- Spread the caramelized onions evenly over the bottom of the par-baked crust. Drop spoonfuls of pesto over the onions and gently spread it into an even layer.
- Pour the egg and cheese mixture over the onions and pesto. The custard should come almost to the top of the crust; if it overflows slightly, that is fine.
- Place the pie on a baking sheet and bake at 375°F (190°C) for 35–40 minutes, until the center is just set but still slightly jiggly when gently shaken. A knife inserted 1 inch from the center should come out mostly clean. The internal temperature should read 160°F (71°C) for egg dishes.
- Let the pie cool on a wire rack for at least 15 minutes before slicing. Serve warm or at room temperature.
Tips
- Don’t rush the onions: Caramelizing properly takes 35–40 minutes. If you turn the heat up too high, the onions will burn and turn bitter. Low and slow is the key.
- Blind-bake the crust: Skipping this step results in a soggy bottom. The par-bake keeps the crust crisp and prevents the custard from soaking in.
- Substitutions: Use any melting cheese like mozzarella, fontina, or cheddar in place of Gruyère. For a lighter custard, swap the heavy cream for all whole milk (the pie will be slightly less rich but still set).
- Check for doneness: The center should still wobble slightly when you pull it out; it will finish setting as it cools. Overbaking makes the custard rubbery.
Serving Suggestions
Serve this pie as a main course with a crisp green salad dressed in lemon vinaigrette. It also works beautifully as a brunch centerpiece alongside roasted potatoes or fresh fruit. For a lighter lunch, cut smaller wedges and serve with a bowl of tomato soup.
Variations
- Add vegetables: Sauté 1 cup of sliced mushrooms or zucchini with the onions for extra depth.
- Swap the pesto: Use sun-dried tomato pesto or arugula pesto for a different flavor profile.
- Make it crustless: Grease a 9-inch pie pan and pour the filling directly in; bake for 25–30 minutes at 375°F (190°C) until set.
- Add protein: Fold in 1/2 cup of cooked, crumbled bacon or diced ham with the onions.
Storage and Reheating
Store leftover pie in the refrigerator, covered, for up to 3 days. To reheat, place slices on a baking sheet and warm in a 350°F (175°C) oven for 10–12 minutes until heated through. You can also microwave individual slices for 1–2 minutes, but the crust will lose some crispness. The pie can be frozen whole or in slices for up to 2 months; thaw overnight in the refrigerator before reheating in the oven.
Frequently Asked Questions
Can I make this pie ahead of time? Yes, you can assemble the pie completely (without baking) and refrigerate it for up to 24 hours. Add 5–10 minutes to the bake time since you are starting from cold. Alternatively, bake it fully, cool, and refrigerate; reheat before serving.
Why is my custard watery? This usually happens if the onions were not cooked down enough—they release moisture during baking. Make sure the onions are deeply caramelized and reduced to about 1 cup before adding them. Also, do not overfill the crust with custard; leave a little room at the top.
Can I use a deep-dish pie pan? Yes, but the bake time will increase. A deep-dish pan holds about 2 cups more volume, so the custard will be thicker and need an extra 10–15 minutes. Check the internal temperature reaches 160°F (71°C).
What if I don’t have pie weights? You can line the crust with parchment and fill it with dried beans, rice, or even a second nested pie pan. These are all fine for blind baking; just make sure to remove them before adding the filling.
Can I use a frozen pie crust? Yes, a frozen deep-dish crust works well. Thaw it in the refrigerator for 30 minutes before blind-baking, and follow the same par-bake instructions.
Is this pie gluten-free? Not as written, but you can use a gluten-free pie crust. The filling itself is naturally gluten-free, so just swap the crust and you are good to go.