About 45 minutes before serving: Prepare pie crust. Roll pastry 1/8 inch thick. Cut out 4 pastry circles, 1/2 inch larger than top of 12-ounce casserole; cut out 1/2 inch circle from center of each. Reroll trimmings for design on pastry circle; cover.
In 3-quart saucepan over medium heat, in hot butter, cook potatoes and onion until tender, stirring. Add flour, salt and thyme; cook 1 minute. Stir in milk; add peas and ham; cook, stirring, until thickened; ladle into casseroles.
Preheat oven to 400 degrees. Press a pastry circle on top of each casserole; brush with egg. Bake 20 minutes until golden. Makes 4 main dish servings.