Preheat your oven to 375°F (190°C).
Prepare the Filling: Heat the olive oil in a large, oven-safe skillet or Dutch oven over medium heat. Add the chopped onion, carrots, and celery. Sauté until softened, about 8-10 minutes.
Stir in the minced garlic and cook for another minute until fragrant.
Add the rinsed lentils, vegetable broth, tomato paste, thyme, rosemary, and soy sauce (or tamari). Bring to a boil, then reduce heat, cover, and simmer for 30-40 minutes, or until the lentils are tender and most of the liquid has been absorbed. Stir occasionally.
While the lentils are simmering, prepare the Mashed Potato Topping: Place the quartered potatoes in a large pot and cover with cold water. Add a generous pinch of salt. Bring to a boil and cook for 15-20 minutes, or until fork-tender.
Drain the potatoes thoroughly and return them to the pot. Add the plant-based milk and vegan butter (or olive oil). Mash until smooth and creamy. Season with salt and white pepper to taste. Do not overmix.
Finish the Filling: Once the lentils are tender, stir in the frozen peas. Cook for 2-3 minutes until heated through. Season the filling with salt and black pepper as needed. If the filling seems too dry, add a splash more vegetable broth.
Assemble the Casserole: If you didn't use an oven-safe skillet, transfer the lentil filling to a 9x13 inch baking dish. Spread the mashed potato topping evenly over the filling, sealing the edges.
Create texture on the potato topping by running a fork across the surface. This will help it brown nicely.
Bake: Place the casserole in the preheated oven and bake for 20-25 minutes, or until the topping is golden brown and the filling is bubbling around the edges.