To prepare the pastry dough, whirl flour, confectioners' sugar, and salt in food processor with the blade attachment. Add about half of the butter and whirl until no chunks remain. Add remaining slices and whirl briefly to chop them up slightly. Turn food processor on again and quickly begin drizzling ice water through the feed tube, stopping before the dough comes together. Pinch some crumbs together between your fingers; if they don’t stick together, add a bit more water and whirl briefly.
Turn the mixture out onto a large piece of plastic wrap. Use the plastic wrap to help you bring the dough together; fold the edges of the dough toward the center and press down until it holds together, taking care not to overwork the dough. Divide it in half and shape into two flat disks wrapped tightly in plastic wrap. Refrigerate for at least 30 minutes.
Preheat oven to 400° F.
Warm 3 tablespoons of the butter in a large sauce pan over medium-low heat. Once the butter has melted, add the flour all at once and whisk constantly for two minutes.
Add the chicken broth and whisk until smooth, scraping down the sides with a spatula if needed. Increase heat to medium and add the milk and bay leaf, whisking to incorporate the milk.
Increase heat to medium-high and, whisking frequently, bring mixture to a simmer. Once the mixture begins to bubble, whisk constantly until it thickens, about one or two minutes more. Add the sherry and whisk to combine. Remove bay leaf. Set aside.
Heat remaining 2 tablespoons of butter in a large skillet over medium-high heat until the foam begins to subside. Add onions, carrots, and celery and cook, stirring often, until vegetables are barely tender, about 5 minutes.
Mix sauteed vegetables and ham into the sauce. Season to taste with freshly grated nutmeg, salt, and pepper.
Prepare the egg wash. Whisk egg, water, and salt together in a small bowl and set aside.
On a lightly floured surface, roll out one of the dough rounds into a 13 to 14-inch circle. Transfer it carefully to the pie dish. Brush some of the egg wash over the dough. Roll out the remaining round into a 13 to 14-inch circle. If using alphabet or decorative cutters, make vent holes.
Mix the parsley and frozen edamame (or peas) into the filling before adding it to the pie dish. Brush the overhanging edge of pie dough with some of the egg wash. Center the top crust over the pie dish and seal the pie gently by pressing down all the way around the pie's edge with the bottom of a fork. Trim any overhanging dough with a knife and flute the edge with your fingers, if desired. If not using cookie cutters for vent holes, cut steam vents in the top. Brush the top crust lightly with egg wash.
Place the pie on a baking sheet to catch any overflow. Bake for 30 minutes on the bottom rack of the oven. Reduce heat to 350º F and continue baking until the crust is golden brown. Allow to cool for several hours before slicing. Serve warm.