Prep the potatoes: Add the potatoes to a pot of cold, salted water. Bring to a boil and cook until fork-tender, about 12–15 minutes.
Drain well.
Mash the potatoes: Return the potatoes to the pot. Add butter or olive oil and enough milk to reach a creamy consistency. Season with salt and pepper.
Set aside.
Sauté the aromatics: In a large skillet, heat olive oil over medium heat. Add onion, carrots, and celery with a pinch of salt. Cook until softened, 6–8 minutes.
Add mushrooms and garlic: Stir in mushrooms and cook until they release moisture and start to brown, about 5 minutes.
Add garlic and cook 1 minute more.
Build the flavor: Stir in tomato paste, soy sauce, thyme, rosemary, and smoked paprika. Cook for 1–2 minutes to concentrate the flavors.
Add lentils and broth: Pour in the lentils and vegetable broth. Bring to a simmer, then reduce heat to low.
Cover and cook until lentils are tender but not mushy, 20–25 minutes. Stir occasionally and add a splash of water if needed.
Thicken the filling (optional): If the mixture looks a bit loose, stir cornstarch or flour into 2 tablespoons of cold water and mix into the pan. Simmer 2–3 minutes to thicken.
Taste and season with salt and pepper.
Finish the filling: Turn off the heat and fold in the frozen peas (and corn, if using). The residual heat will warm them through.
Assemble: Preheat the oven to 400°F (200°C). Transfer the filling to a 2–2.5 quart baking dish.
Spoon the mashed potatoes over the top and spread evenly to the edges to seal in the filling. Create swirls or ridges with a fork.
Optional glaze: Brush the top lightly with melted butter or olive oil for extra color and flavor.
Bake: Bake for 20–25 minutes, until the top is lightly golden and the filling is bubbling around the edges. For more browning, broil for 1–2 minutes, watching closely.
Rest and serve: Let the pie rest 10 minutes before serving.
Garnish with chopped parsley if you like.