Chill & prep: If making homemade crust, combine flour, salt, (sugar). Cut in cold butter until pea-sized pieces remain. Add ice water 1 tbsp at a time until dough holds; divide into two disks, wrap, chill 30+ minutes. Preheat oven to 400°F (205°C) when ready to assemble.
Prepare shrimp: Pat shrimp dry and lightly season with salt and pepper. Cut large shrimp into bite-sized pieces; small shrimp may be left whole.
Sauté aromatics: In a large skillet over medium heat, melt butter. Add diced onion, celery, and red pepper; sweat 5–7 minutes until softened. Add minced garlic and cook 30 seconds.
Make the roux: Sprinkle 1/3 cup flour over the vegetables and stir for 1–2 minutes to cook the raw flour taste (you’re making a blond roux).
Add dairy & stock: Slowly whisk in half-and-half and stock, scraping the pan. Bring to a gentle simmer and cook 3–5 minutes until the mixture thickens into a glossy sauce.
Season & finish filling: Stir in Dijon, Old Bay (or season blend), corn, and shredded cheese (if using). Add lemon zest and 1 tbsp lemon juice. Fold in thyme and parsley. Taste — adjust salt, pepper, and acidity.
Add shrimp: Gently stir shrimp into the sauce and cook 1–2 minutes just until they begin to turn pink (they will finish cooking in the oven). Remove from heat. If filling is too thin, simmer to reduce slightly or whisk in a small cornstarch slurry; if too thick, add 1–2 tbsp stock.
Roll & assemble: Roll bottom crust to ~12" and fit into a 9" pie pan. Trim a small overhang. Spoon shrimp filling into the crust. Optionally sprinkle buttered panko over filling for crunch. Roll top crust; place over filling (or make lattice). Trim and crimp edges; cut vents in top crust. Brush with egg wash. Place pie on a rimmed sheet.
Bake: Bake at 400°F (205°C) for 20 minutes. Reduce oven to 375°F (190°C) and bake another 25–30 minutes until crust is deep golden and filling bubbles at vents (total ~45–50 minutes). If edges brown too fast, shield with foil.
Rest & serve: Remove from oven and rest 10–15 minutes to let filling set. Slice and serve with lemon wedges and extra parsley.