Heat oven to 400º F.
Heat the oil in a large saucepan over medium-high heat. Cook the leeks and fennel, stirring occasionally, until soft, 5 to 6 minutes.
Add the flour and cook for 1 minute, stirring (do not let it darken).
Stir in the wine, milk, 1 ¼ teaspoons salt, and ¼ teaspoon pepper. Simmer until thickened, 2 to 3 minutes. Stir in the shrimp and parsley.
Transfer the mixture to a shallow 2-quart baking dish. Lay the pastry on top, trimming to fit, and cut vents in the top.
Bake until the shrimp mixture is bubbling and the pastry is golden brown, 25 to 30 minutes.