Boil the potatoes in salted water until fork-tender, about 15–20 minutes. Drain and mash with butter, milk, salt, and pepper. Set aside.
In a large skillet, heat olive oil over medium heat. Sauté the onions and carrots until softened, about 5 minutes. Add garlic and cook 1 minute more.
Add the ground meat and cook until browned. Stir in tomato paste, Worcestershire sauce, thyme, salt, and pepper. Sprinkle in flour (if using) and stir for 1–2 minutes. Pour in broth and simmer until thickened, about 5 minutes. Add peas and stir through.
Preheat oven to 400°F (200°C). Spread the meat mixture evenly in a baking dish. Spoon mashed potatoes over the top and spread into an even layer. Use a fork to create texture for browning. Sprinkle with cheese, if using.
Bake for 20–25 minutes, or until the top is golden brown and the filling is bubbly around the edges.
Let cool slightly before serving. Scoop into generous portions and enjoy.