Combine 2 1/2 cups flour, 1 teaspoon salt, and the sugar in a food processor. Add 1 cup butter; process until mixture resembles coarse meal, 8 to 10 seconds. Add 1/4 to 1/2 cup ice water in a slow steady stream through feed tube with machine running, until dough holds together, about 30 seconds. Turn dough onto piece of plastic wrap; divide in half. Press each half into flat circles, wrap each in plastic, and refrigerate at least 1 hour or overnight.
Place chicken and stock in a medium stockpot. Add enough water just to cover chicken. Bring to a boil, reduce heat, and simmer gently until chicken is cooked through, 45 minutes. Using tongs, transfer chicken to a plate; set aside until cool enough to handle. Strain 2 cups stock into a measuring cup, and set aside. (Remaining stock may be frozen for another use.)
Preheat oven to 375 degrees, with rack in center. Cook pearl onions in a medium pan of simmering water for 15 minutes. Drain, and rinse under cool water. Peel onions; set aside. Remove skin and bones from chicken, and discard. Shred chicken into bite-size pieces, and set aside.
Melt remaining butter in a large high-sided skillet over medium heat. Add potatoes, carrots, and onions, and cook, stirring occasionally, until potatoes begin to turn golden. Add mushrooms, and cook 5 minutes more. Add remaining flour, and cook, stirring, for 1 minute. Add reserved chicken stock and milk; bring to a simmer. Cook until thick and bubbly, stirring constantly. Stir in reserved chicken, peas, thyme, sage, and salt and pepper to taste. Remove from heat, and let cool slightly.
Beat egg with 1 teaspoon water to make glaze. On a lightly floured surface, roll out half the dough to a 12-inch circle. Transfer dough to a 9 1/2-inch glass pie plate with dough overlapping top of pan. Trim dough to about a 1-inch overhang. Carefully spoon filling into dough.
Roll out remaining dough to a 10-inch circle, and transfer to top of filling. Fold overlapping edges of dough under to make a firm edge. Use fingers to pinch a decorative border. Use a knife to make four to five slits into the center of the pie. Brush top of dough with egg glaze. Bake pie on a baking sheet until dough is golden brown, rotating pie halfway through for even baking, 45 to 60 minutes.