Cook lentils for filling: Simmer the lentils in enough water to cover them by about 2 inches for about 20 minutes, or until just tender. Drain in a fine-mesh sieve.
Cook red lentils and squash for topping: Simmer butternut squash and red lentils in enough water to cover them by about 2 inches for 15–20 minutes until the squash is just soft. Drain in a fine-mesh sieve. Set aside.
Cook aromatics: In a large nonstick pan, sauté the onion, carrot, and garlic in a splash of broth until soft.
Add smoked paprika, thyme, oregano, tomato paste, and sun-dried tomatoes. Stir 2 minutes to build flavor.
Mix in lentils, peas, tamari, vegetable broth, and balsamic vinegar. Cook 3–4 minutes more, seasoning to taste.
Dissolve the miso in nondairy milk.
Mash: Stir the dissolved miso, nutritional yeast, and tahini (if using) into the squash–lentil mixture, then mash until smooth. Add milk as needed for a creamy consistency, but avoid making it too moist, or the topping will brown less in the oven.
Preheat the oven to 400°F (200 °C).
Spread the filling evenly in a baking dish. Add dollops of the topping with an ice cream scoop or spoon, then smooth.
Bake for 25 minutes, then broil for 2–3 minutes until lightly browned.
