Prepare the crust: Roll out chilled pie dough to a 13-inch circle. Fit into a 9-inch pie plate; trim and crimp the edges. Put in the freezer to chill while preheating the oven to 425 degrees.
Blind bake: Line crust with parchment paper, fill with pie weights or dry beans, and bake for 10-12 minutes or until the edges are dry. Remove the weights, prick base with a fork, and bake 6-8 minutes more until lightly golden. Cool slightly and reduce oven temperature to 350 degrees.
Make the custard: In a large bowl, whisk together the eggs, milk, salt, pepper and thyme (if using). Fold in 3/4 cup of the cheese, ham or bacon, and green onions.
Assemble: Pour filling into prebaked crust, sprinkle remaining cheese on top, and place on a rimmed baking sheet.
Bake: Bake 30 minutes, then check the center. Continue baking 20-25 minutes until set and a knife inserted in the middle comes out clean.
Cool and serve: Let cool 20-30 minutes before slicing for neat edges and to ensure a set interior.