Preheat the oven to 350°F (180°C).
In a large bowl, toss the squash and potatoes with ¾ teaspoon of the salt and ¼ teaspoon of the pepper.
In a medium saucepan, heat 3 tablespoons of the olive oil over medium-high heat until it shimmers. (You can also do this directly in the dish you’ll be baking in, if it’s flameproof.) Add the onion and garlic and cook, stirring frequently, until soft and starting to brown, 2 to 3 minutes.
Reduce the heat to medium, add the flour, and whisk until it’s starting to turn golden, about 30 seconds. Slowly whisk in the milk and water. Increase the heat to medium-high and bring to a simmer, stirring frequently, until the sauce is thick enough to coat the back of a spoon, 4 to 5 minutes. Remove from the heat.
In a small bowl, whisk the miso with ¼ cup (60ml) of the hot sauce until smooth, then transfer it back to the saucepan and stir to combine. Stir in the nutritional yeast, lemon juice, thyme, cayenne, ¼ teaspoon of
the salt, and the remaining ¼ teaspoon black pepper. Taste—it should taste aggressive, since the vegetables are so mild—and season with more salt as needed.
Transfer about ½ cup (120ml) sauce to a 3-quart (3L) baking dish (such as an oval casserole), 9-inch (23cm) square pan, or large deep ovenproof skillet. (If you made the sauce in the dish you’ll be baking in, pour all but about ½ cup/120ml sauce out into a large measuring cup.)
On top of the sauce, make a single layer of overlapping squash and potatoes (no need to be exacting!). Add
½ cup (120ml) sauce over the top, spreading evenly. Repeat with another layer of vegetables and sauce, continuing until you have used up all the vegetables and ending with ½ cup (120ml) sauce.
Cover with a lid or sheet pan and bake until the sauce is bubbling at the edges, 30 minutes. Uncover and bake until the vegetables are very soft and the sauce is thick and bubbling in the center of the dish, 30 to 40 minutes.
While the dish is baking, in a small bowl, stir together the panko, remaining 1 tablespoon olive oil, and remaining ¼ teaspoon salt.
When the casserole has about 10 minutes remaining, scatter the panko mix over the top. It should brown nicely by the time the sauce is bubbling.
Remove from the oven, scatter with thyme and more black pepper, if desired, and let cool for 10 minutes before serving warm, with lemon wedges.