Boil the potatoes in salted water until fork tender, about 20 minutes, then drain.
Mash with the milk, butter, and salt until smooth and spreadable. Set aside.
For the filling
Heat the olive oil in a large skillet over medium heat. Add the onion, celery, and carrot and cook until softened, about 8 minutes.
Add the mushrooms and cook until they release their liquid and it evaporates, 6 to 8 minutes. The pan should look dry and the mushrooms browned before you go on.
Stir in the cumin and Italian seasoning and cook until fragrant, about 30 seconds.
Pour in the brandy and cook until the alcohol cooks off, about 1 minute, scraping up anything stuck to the pan.
Stir in the tomato paste, Worcestershire sauce, and balsamic vinegar and cook 1 minute.
Add the lentils, diced tomatoes, and vegetable broth. Bring to a boil.
Reduce the heat to low, cover loosely, and simmer until the lentils are soft and the sauce has thickened, 25 to 30 minutes. Add more broth a splash at a time if it tightens up before the lentils are done.
Stir in the peas and cook 2 minutes more. Taste and adjust the salt.
To assemble
Heat the oven to 400°F.
Transfer the filling to an 8x8 baking dish. Drop the mashed potato over the top in spoonfuls, then spread to the edges with a spatula and drag a fork across in waves.
Bake until the filling bubbles at the edges, about 20 minutes.
Move to the top rack and broil 2 to 3 minutes until the ridges brown. Watch it, it turns fast.
Rest 5 minutes before serving.
Notes
Brown the mushrooms until the pan looks dry before adding liquid. Wet mushrooms give you a watery filling.
Red lentils are meant to break down here. That soft, mince-like texture is the point.
To make it vegan, swap the butter for vegan butter and the milk for any unsweetened plant milk.
To make it without lentils, use two cans of drained brown lentils or 3 cups of cooked green lentils, and cut the broth to 1 cup.
Check your Worcestershire bottle if you need this gluten free. Some formulations use malt vinegar.
Assemble up to two days ahead and refrigerate unbaked, or freeze up to three months. Bake from chilled, adding 10 to 15 minutes.
Store leftovers covered in the fridge up to 4 days. Reheat at 350F until hot through, about 20 minutes.