Mix together 1 1/4 cups flour and 1/2 teaspoon salt in a large bowl. Add cold cubed butter and use a pastry cutter or your fingertips to work it into the flour until it looks like coarse breadcrumbs. Add ice water one tablespoon at a time, stirring gently until the dough just comes together. Don't overwork it or your crust gets tough—trust me on this.
Form the dough into a flat disk, wrap it in plastic wrap, and stick it in the fridge for 15 minutes while you prep the filling. This resting time matters more than you'd think for keeping the crust tender and flaky when it bakes.
Heat 1 tablespoon olive oil in a skillet over medium heat. Add 1/2 cup diced red onion and sauté for about 2 minutes until it softens slightly. Toss in 2 minced garlic cloves and cook for another 30 seconds until fragrant, then add 1 cup chopped fresh spinach and stir constantly for about 2 minutes.
Let the spinach mixture cool completely—this step stops it from cooking the egg filling before it hits the oven. I usually spread it on a plate for a few minutes to speed this up. Once it's cooled, you'll hear it sizzle when it hits the warm eggs later, which actually helps build flavor.
Roll out your chilled dough to fit a 9-inch pie pan, pressing it gently into the corners. Prick the bottom with a fork a few times to prevent big air bubbles. Bake at 375°F for 8-10 minutes until it's just barely set but still pale—we're doing a blind bake to keep it crispy underneath.
While the crust pre-bakes, whisk together 4 large eggs, 1 cup whole milk, 1/4 teaspoon black pepper, and 1/4 teaspoon ground nutmeg in a separate bowl. The nutmeg is the secret ingredient nobody expects—it adds warmth without being obvious. Pour this custard into the slightly cooled crust, then scatter the cooled spinach mixture and 1 cup shredded mozzarella over top.
Bake at 375°F for 35-40 minutes until the filling is set but still has a tiny bit of jiggle in the very center when you gently shake the pan. The carry-over heat finishes cooking it as it cools. Don't panic if it looks watery at first—it thickens up fast once the eggs set completely.