Preheat your oven to 400°F (200°C).
In a large skillet, heat olive oil over medium heat. Add the onions and garlic, sauté until softened.
Add carrots, peas, and corn to the skillet. Cook for about 5 minutes until vegetables begin to soften.
Stir in vegetable broth, tomato paste, thyme, and rosemary. Let simmer for 10 minutes.
Season with salt and pepper to taste. Transfer the mixture to a baking dish.
Spread the mashed potatoes evenly over the vegetable mixture.
Bake in the preheated oven for 20 minutes, or until the top is golden brown.
Let rest for a few minutes before serving.