Preheat oven to 375°F. Roll out tart dough to about 14 inches and about 1/8-inch thick and gently press into 10-inch tart pan. Roll pin across the top to trim excess dough.
Prick bottom of tart shell with a fork, line with parchment or foil, and fill with beans or pie weights. Bake for 15 minutes.
Remove tart shell from oven and let cool. Raise oven temperature to 425°F.
Toss butternut squash with olive oil, season with salt and pepper, and spread out on a baking sheet.* Bake until tender and lightly browned, stirring and flipping the cubes about halfway through, 35 to 40 minutes. Remove from oven, drain, and let cool. Reduce oven to 350°F.
Melt butter in a large saucepan over medium heat. Add the leeks and thyme sprigs, season liberally with salt and pepper, and stir together. Reduce heat to medium-low and cook until leeks are soft, stirring occasionally, about 15 minutes. Add minced garlic during last minute of cooking and stir to combine. Discard thyme sprigs, drain leeks and let cool.
In a large mixing bowl, whisk together beaten eggs, crème fraîche, grated Gruyère, black pepper and thyme leaves.
Spread leeks evenly in bottom of tart shell and top with butternut squash cubes. Pour crème fraîche-Gruyère mixture evenly over the top.
Bake for 30 to 40 minutes, or until top is set and lightly golden brown.