Add the diced potato, carrot, and ham to the pot. Stir and cook for about 3 minutes. Sprinkle the flour over the mixture and cook for an additional 2 minutes to remove the raw flour taste.
Slowly pour in the chicken broth and milk while stirring continuously. Allow the sauce to thicken, about 3-5 minutes. Season with dried thyme, dried rosemary, onion powder, salt, and pepper
Brush the top crust with the beaten egg. Bake in the preheated oven until the crust is golden brown and the filling is bubbly, about 35-40 minutes. If the crust browns too quickly.