Place the peeled, cubed potatoes in a large pot and cover with cold water by about an inch (2.5 cm). Add a generous pinch of salt and bring to a boil over high heat.
Reduce to a steady simmer and cook until a knife slides through easily, about 15 to 18 minutes. Drain the potatoes in a colander and let them sit for 2 to 3 minutes so the surface steam escapes.
Return the drained potatoes to the warm, empty pot. Add 4 tablespoons (57 g) of the butter, the warmed milk, 3/4 teaspoon salt, and 1/4 teaspoon pepper. Mash or rice until smooth, stopping as soon as there are no lumps to avoid a gummy texture.
If using the egg yolk, stir it in now while the mash is hot. It sets during baking and deepens the golden color. Set the mash aside.
Heat the olive oil in a large, deep skillet over medium-high heat. Add the ground lamb and break it up with a wooden spoon. Cook until browned and no longer pink, about 6 to 8 minutes.
Tip the pan and spoon off most of the rendered fat. Ground lamb browns with more rendered fat than beef, so draining here keeps the finished filling from turning greasy.
Add the diced onion and carrots to the browned lamb. Cook, stirring often, until the onion softens and turns translucent, about 5 minutes. Stir in the minced garlic and cook for 1 more minute until fragrant.
Season the mixture with 3/4 teaspoon salt and 1/2 teaspoon pepper. Stir in the tomato paste and cook for 1 to 2 minutes until it darkens slightly.
Sprinkle the flour over the meat and stir until no dry streaks remain, about 1 minute. Pour in the beef stock and Worcestershire sauce, scraping up any browned bits from the bottom.
Add the thyme and rosemary, then simmer for 5 to 8 minutes until the sauce thickens and coats the back of a spoon.
Stir the frozen peas into the thickened filling. Cook for 1 to 2 minutes, just until they are heated through and bright green. Taste and adjust the salt and pepper. Remove from the heat.
Preheat the oven to 400°F (200°C). If your skillet is not oven-safe, transfer the filling to a 2-quart baking dish and spread it level.
Spoon the mashed potatoes over the top in dollops, then gently spread them to the edges to seal in the filling. Drag a fork across the surface to make ridges.
Melt the remaining 1 tablespoon of butter and brush it over the top, then sprinkle with cheddar if using.
Bake, uncovered, for 25 minutes until the top is golden and the filling bubbles at the edges. For extra color, run it under the broiler for 2 to 3 minutes, watching closely.
Let the pie rest for 10 minutes before serving so the filling settles. Scoop straight from the dish and serve hot.