Place an oven rack in the center of the oven and preheat to 400 degrees F. Line a baking sheet with parchment paper.
For the filling: Heat the oil over medium-high heat in a large skillet. Cook the leeks until slightly softened, about 3 minutes. Add the carrots, mushrooms, potato, garlic, thyme, salt and pepper. Stir frequently until the vegetables are tender, about 12 minutes.
For the sauce: Melt the butter over medium heat in a 1-quart saucepan. Add the flour and whisk until smooth, about 2 minutes. Add the milk, whisking constantly to prevent lumps. Simmer over medium heat, whisking constantly, until the sauce is thick and smooth, about 10 minutes. Remove the pan from the heat and stir in the cheese, salt, pepper and nutmeg.
Combine the vegetable mixture, sauce and chicken in a medium bowl. Season with salt and pepper. Cool the filling completely, about 20 minutes.
Roll out the pastry into a 10-by-10-inch square on a lightly floured surface. Transfer the pastry to the prepared baking sheet. Lightly brush the edges of the pastry with beaten egg using a pastry brush. Spoon the filling onto one side of the pastry. Fold the pastry over to encase the filling. Fold and crimp the edges of the pastry together to seal the filling. Brush the top of the pastry with beaten egg. Cut a 1/2-inch-long slit in the top of the pie using a paring knife.
Bake until puffed and golden, 30 to 35 minutes. Cool for 15 minutes and slice into 4 pieces.
Recipe courtesy of Giada De Laurentiis