Preheat your oven to 375°F (190°C).
In a large skillet, heat olive oil and sauté onion, garlic, carrots, and celery until softened.
Stir in tomato paste, thyme, rosemary, and soy sauce. Mix well.
Add cooked lentils and vegetable broth. Simmer for 10 minutes until thickened.
Fold in frozen peas and season with salt and pepper.
Spread the lentil mixture evenly in a baking dish.
Top with mashed potatoes, spreading them smoothly across the top.
Bake for 25–30 minutes until golden brown on top.
Let it cool for a few minutes before serving.