Beef

Preheat oven to 450°F and bake potatoes on a foil-lined baking sheet until tender, about 45 minutes; let cool slightly and peel
Press potatoes through a ricer, food mill, or colander into a large bowl; add butter, stir until well blended, stir in milk, and season to taste with salt
Soak dried porcini in 3 cups hot water and set aside
Combine lentils, one garlic clove, and 1 tsp salt with 4 cups water; bring to a boil, reduce heat, and simmer until lentils are tender; drain and discard the garlic
Heat oil in a large heavy pot over medium, add onions and cook until soft, add chopped garlic and cook 1 minute, then stir in tomato paste and cook until caramelized
Add bay leaves and dry white wine, stir and add porcini and reserved soaking liquid, then simmer until liquid is reduced by half
Stir in vegetable stock and cook, stirring occasionally, until reduced by half
Strain the mixture into a large saucepan and bring to a boil; dissolve cornstarch in water, add and simmer until thickened, whisk in miso, and season with salt and pepper; set sauce aside
Preheat oven to 450°F; toss vegetables and pearl onions with remaining oil, the remaining garlic cloves, and rosemary; season with salt and pepper and divide between two rimmed baking sheets; roast until tender, 20–25 minutes; transfer roasted garlic cloves to a small bowl, mash, and stir into the sauce; discard rosemary
Arrange the cooked lentils in an even layer in a 3-qt. baking dish
Toss the roasted vegetables with fresh mushrooms and chopped herbs and layer the mixture on top of the lentils
Pour the prepared sauce over the vegetables
Spoon the potato mixture evenly over the top
Bake until browned and bubbly, about 30 minutes, then let stand 15 minutes before serving