Preheat your oven to 425°F (220°C) and place a baking sheet in the oven to catch any drips.
In a large skillet over medium heat, heat the olive oil. Add the diced onion and sauté for about 5 minutes until translucent.
Add the minced garlic and cook for an additional minute.
Stir in the shredded chicken, diced carrots, peas, and cooked potatoes. Mix well.
Season with thyme, rosemary, salt, and pepper. Stir to combine.
Sprinkle the all-purpose flour over the mixture and stir to coat the ingredients evenly; cook for about 2 minutes.
Gradually whisk in the chicken broth and milk, stirring constantly until the mixture thickens, about 5 minutes. Remove from heat.
Roll out one pie crust and fit it into the bottom of a pie dish. Pour the chicken filling into the crust.
Roll out the second pie crust and place it over the top of the filling. Trim any excess, and pinch the edges to seal. Cut slits in the top for steam to escape.
Beat the egg in a small bowl and brush it over the top crust for a golden finish.
Place the pie on the preheated baking sheet in the oven and bake for 30-35 minutes or until the crust is golden brown.
Let the pie cool for about 10 minutes before slicing and serving.