Heat oven to 350 degrees F.
Place garlic in ovenproof dish and bake until soft, 40 to 45 minutes. When cool enough to handle cut 1/2-inch off the top and squeeze out pulp. Set aside.
On a lightly floured surface, roll out pastry to a thickness of 1/8-inch. Place pastry in an 11-inch tart pan; press to fit into bottom and up the sides of pan. Trim excess pastry by rolling the rolling pin across the top. Refrigerate for 1 hour.
Line pastry with parchment paper, pressing into the edges, and fill with pie weights, beans, or rice. Place on baking sheet and bake for 20 to 25 minutes.
Heat 2 tablespoons water in a large saute pan over medium heat. Add spinach, cover and cook until spinach is barely wilted, 2 to 3 minutes. Remove with tongs to a colander and set aside to cool. When spinach is cool enough to handle squeeze out excess water. Chop coarsely and set aside.
Heat olive oil in a large saute pan over medium heat. Add pancetta and cook until pancetta has rendered much of its fat. Add onion and cook until softened, 7 to 10 minutes. Uncover, raise heat to high. Stirring constantly, cook until a rich golden brown, 3 to 5 minutes. Stir in the spinach and roasted garlic. Season with salt and pepper.
Turn the filling into a bowl and cool. Blend in the cheese and eggs.
Pour filling into prepared tart shell. Bake until the filling is set and the pastry browned, about 45 minutes. Cut into 8 wedges and serve hot.
2 1/2 cups all-purpose flour
1 teaspoon salt
1 teaspoon sugar, optional
1 cup (2 sticks) cold unsalted butter, cut into small pieces
In the bowl of a food processor, add flour, salt, and sugar. All ingredients should be cold. Add the pieces of butter and process for approximately 10 seconds or until the mixture resembles coarse meal. (To mix by hand, combine the dry ingredients in a large mixing bowl. Using a pastry blender or 2 table knives, cut in the butter until the mixture resembles coarse meal.)
Add 1/4 to 1/2 cup ice water, drop by drop, through the feed tube with the machine running, just until the dough holds together without being wet or sticky; do not process more than 30 seconds. Test the dough at this point by squeezing a small amount together. If it is crumbly, add a bit more water.
Turn the dough out onto a large piece of plastic wrap. Grasping the ends of the plastic wrap with your hands, press the dough into a flat circle with your fists. This makes rolling easier than if the pastry is chilled as a ball. Wrap the dough in the plastic and chill for at least 1 hour.
2 (8 to 10-inch) tarts or single crust pies, or 1 (8 to 10-inch) double crust pie