Preheat the oven to 425°F. Lightly oil a 9×13-inch baking dish and set aside.
Cook the mushrooms: Heat the olive oil in a skillet over medium-high heat. Add the mushrooms and season with salt. Cook for 6–8 minutes, until deeply golden. Remove from heat and stir in the grated garlic.
Make the green miso sauce: In a blender or food processor, combine the spinach, basil, miso paste, water, heavy cream, olive oil, and lemon juice. Blend until smooth and bright green. Season generously with salt and black pepper.
Assemble the gratin: Add the cooked mushrooms, garlic, and white beans to the prepared baking dish. Pour the green miso sauce over the mixture, stir to combine, and smooth the top.
Make the topping: In a bowl, mix together the panko breadcrumbs, Pecorino Romano, olive oil, and sesame seeds. Sprinkle evenly over the gratin.
Bake for 25 minutes, until bubbling and deeply golden on top.
Let rest for 5–10 minutes before serving.
Finish with Greek yogurt or labneh, a drizzle of olive oil, and flaky salt.