Preheat the oven to 375°F (190°C). Place a baking sheet in the oven or have one ready to place beneath the pie dish to catch any bubbling filling.
Melt the butter in a large sauté pan over medium heat. Add the chopped onion and minced garlic and cook for about 2–3 minutes, until softened and fragrant.
Add the diced carrots and potatoes. Cook for about 5–7 minutes, stirring occasionally, until the vegetables begin to soften. Add the peas and cook for another minute. Sprinkle the flour evenly over the vegetables and stir continuously for about 1 minute to cook the flour.
Slowly pour in the vegetable broth while stirring constantly. Continue cooking until the mixture thickens into a creamy vegetable filling. Season with salt and black pepper to taste.
Roll out one chilled pie crust and fit it into a 9-inch pie dish, gently pressing it into the bottom and sides. Trim any excess crust around the edges.
Spoon the warm vegetable filling evenly into the crust-lined dish. Roll out the second crust and place it over the filling. Trim and crimp the edges to seal the pie.
Brush the top crust with the beaten egg. Cut several small slits in the center of the crust to allow steam to escape.
Place the pie on the baking sheet and bake for 40–45 minutes, or until the crust is deeply golden brown and the filling is bubbling. If the edges brown too quickly, loosely cover them with aluminum foil during the final portion of baking.
Remove the pot pie from the oven and let it rest for 15 minutes before slicing and serving.