Preheat the oven to 375°F (190°C).
Melt the butter over medium heat in a large skillet.
Add the chopped onion, carrots, and celery. Cook until the vegetables are tender, about 5-7 minutes.
Stir in the diced ham and frozen peas, cooking for an additional 2-3 minutes.
Sprinkle the flour over the mixture and stir well to coat the ingredients. Cook for 1-2 minutes to eliminate the raw flour taste.
Pour in the broth and milk, stirring constantly until the mixture thickens.
Add the dried thyme, dried rosemary, salt, and pepper to the skillet.
Simmer for 5 minutes, allowing the flavors to blend.
Roll out one of the sheets of pie crust and place it in the bottom of a 9-inch pie dish.
Pour the ham and vegetable filling into the crust.
Roll out the second sheet of pie crust and place it over the filling. Press the edges together to seal the pie and cut a few slits in the top crust to allow the steam to escape.
Bake in the preheated oven for 40-45 minutes, or until the crust is golden brown and the filling is bubbly.
Allow the pie to cool for a few minutes before serving.