Blend together flour, salt, butter, and shortening with your fingertips, or a pastry blender just until most of the mixture resemble coarse meal with small (roughly pea-sized) butter lumps. Drizzle evenly with 4 tablespoons ice water and gently stir with a fork until incorporated.
Squeeze a small handful: if it doesn't hold together, add ore ice eater 1 tablespoon at a time, stirring until just incorporated, then test again. (Do not overwork mixture or pastry will be tough.)
Turn out mixture onto a lightly floured surface and divide into 8 portions. With the heel of your hand smear each portion once or twice in a forward motion. Gather dough together with a scraper and divide in half. Form into 2 balls, then flatten into 2 (5 inch disks). Chill, wrapped in plastic wrap until firm, about 1 hour.
Roll out 1 disk (keep the other chilled) into an 11 inch round on a lightly floured surface with a floured rolling pin, then fit into pie plate. Trim excess dough, leaving a 1/2 inch overhang, then fold overhang under and crimp decoratively. Chill 30 minutes.
Make Filling while Shell Chills.
Bring 1 inch of water to a boil in a 5 to 6 quart heavy pot. Stir in spinach and cook, covered over moderate heat until just wilted, approximately 1 minute. Drain in a colander and, when cool enough to handle, squeeze dry.
Wash leeks in a bowl of cold water, then lift out and drain.
Heat olive oil in a 12 inch heavy skillet over moderately high heat until hot but not smoking, then saute red onion, leeks and carrots, stirring occasionally until onion is golden, about 6 minutes. Add zucchini, garlic, thyme 1/4 teaspoons salt, and 1/8 teaspoons pepper. Saute stirring occasionally, until zucchini is just tender, 3 to 4 minutes. Remove from heat and cool completely.
Stir together ricotta, spinach, sauteed vegetables, Gruyere and the remaining 1/2 teaspoons salt and 1/8 teaspoons pepper.
Assemble and Bake Pie:
Put baking sheet in the middle of oven and preheat to 425°F
Roll out remaining disk of dough into an 11 inch round on a lightly floured surface with a floured rolling pin and cut into 10 (3/4 inch wide) strips. Spoon filling into chilled pie shell. Arrange 5 pastry strips, 3/4 inch apart, over filling, trimming ends of strips. Arrange the remaining 5 strips, 3/4 inch apart over the other strips to form a lattice pattern, trimming ends. Press ends of the lattice onto edge of pie shell.
Brush egg wash over pastry lattice and edge. Bake on hot baking sheet until the pastry is golden and filling is set, about 25 to 30 minutes. Transfer pie of a rack and cool to warm.