Prep and preheat: Heat your oven to 425°F (220°C). Lightly grease a 9x13-inch baking dish. Pat the cauliflower florets dry so they roast instead of steam.
Roast the cauliflower: Toss florets with 1 tablespoon olive oil, a pinch of salt, and pepper.
Spread on a sheet pan and roast 18–22 minutes, flipping once, until lightly browned and just tender.
Sauté the mushrooms: While the cauliflower roasts, heat 1 tablespoon olive oil and 1 tablespoon butter in a large skillet over medium-high heat. Add mushrooms with a pinch of salt and cook 6–8 minutes, stirring occasionally, until they release moisture and start to brown.
Cook the aromatics: Reduce heat to medium. Add the onion and cook 3–4 minutes until translucent.
Stir in garlic and thyme; cook 30 seconds until fragrant.
Build the roux: Sprinkle in the flour and stir to coat the vegetables. Cook 1 minute to remove raw flour taste.
Add liquids: Whisk in milk (or half-and-half) gradually, then broth. Stir in Dijon and nutmeg.
Simmer 3–5 minutes, stirring, until the sauce thickens enough to coat a spoon. Season with salt and pepper to taste.
Add the cheese: Off heat, stir in 1 cup shredded Gruyère (or Swiss) and 1/4 cup Parmesan until melted and smooth. Reserve the remaining cheeses for topping.
Assemble: Reduce oven to 375°F (190°C).
Add roasted cauliflower to the baking dish. Pour the creamy mushroom sauce over and gently toss to coat and distribute evenly.
Make the crunchy top: In a small bowl, melt 1 tablespoon butter. Combine with panko, remaining Gruyère, and remaining Parmesan.
Season with a little pepper.
Bake: Sprinkle the topping over the casserole. Bake 18–22 minutes, until bubbling around the edges and golden on top.
Rest and serve: Let it stand 5–10 minutes to set. Garnish with chopped parsley if you like, then serve warm.