Position rack in bottom of oven. Preheat to 375F.
Add flour, sugar, 1/4 tsp salt and thyme into a food processor and blend to combine. Add butter. Pulse until crumbs form. With motor running, add ice water through spout. Continue blending just until dough comes together. It should not be too sticky.
Lay a large piece of parchment on counter. Sprinkle lightly with flour. Pour pastry dough from food processor onto the parchment and form into a ball. Dust rolling pin with flour. Roll pastry on parchment into a circle, about 12 to 13 inches wide. Pastry will be quite thin, and edges will be uneven, but this is a rustic pie, so do not fret. Transfer parchment and pastry onto a baking sheet.
Spread cooled onion mixture onto centre of pastry, forming a 10-to-11-inch circle. Fold pastry over, just to cover edge of the onions (about 1.5 to 2 inches). Centre of pie will not be covered with pastry, and edge will be uneven. Lightly brush pastry with egg mixture. Then dot the onions with the crumbled gorgonzola.
Bake until pastry is golden brown, and mixture is bubbly, 35 to 40 min.