Start by chopping the carrots, onions, and celery into small, even pieces. Place the carrots, onions, and celery in a large pot, then cover with water and bring to a boil. Cook until the vegetables are tender but still have a slight bite, about 10 minutes. Drain and set aside.
While the vegetables cook, rinse the lentils and add them to a separate pot with the vegetable broth. Bring to a gentle simmer and cook until the lentils are tender but still hold their shape, about 25 minutes. Drain any excess liquid and set aside.
Peel the potatoes and cut them into even chunks. Place them in a pot, cover with cold water, and bring to a boil. Cook until the potatoes are soft and easily pierced with a fork, about 15 minutes. Drain well.
Mash the cooked potatoes with a potato masher or fork until smooth. Stir in the butter (if using), thyme, rosemary, and season with salt and pepper. Keep warm.
In the same large pot, combine the cooked lentils with the sautéed vegetables. Add a splash of broth if needed to loosen the mixture. Season with salt, pepper, and herbs, then simmer gently for about 5 minutes to meld the flavors.
Preheat your oven to 375°F (190°C). Spread the lentil mixture evenly in a baking dish, then spoon the mashed potatoes over the top, smoothing with the back of a spoon or spatula. Aim for an even layer with gentle ridges for a rustic look.
Bake the shepherd’s pie in the preheated oven until the top is golden brown and bubbling around the edges, about 25-30 minutes. Keep an eye on it to prevent over-browning.
Remove from the oven and let it rest for a few minutes. Serve hot, revealing a hearty, textured filling beneath a fluffy, golden top. Enjoy your comforting homemade shepherd’s pie!