Bring a large pot of salted water to a rolling boil. Blanch the fresh spinach in batches for exactly 1 minute until wilted and bright green, then transfer to a colander and run cold water over it to stop the cooking.
Once cooled, squeeze handfuls of spinach firmly to remove as much water as possible, then roughly chop and set aside.
Heat 2 tablespoons of butter in a large skillet over medium-high heat until foaming. Add the sliced mushrooms in a single layer and cook undisturbed for 3-4 minutes to brown, then stir and cook another 3-4 minutes until moisture evaporates. Season with salt and pepper and transfer to a plate.
In the same skillet, add the remaining 2 tablespoons of butter over medium heat. Cook the diced onion for 5-6 minutes until softened and translucent, then add the minced garlic and cook for 1 minute until fragrant.
Sprinkle the flour over the onion and garlic and stir constantly for 2 minutes to create a roux. Slowly pour in the heavy cream while whisking continuously, then add the vegetable broth and whisk until smooth.
Bring the sauce to a gentle simmer and cook for 3-4 minutes until thickened enough to coat the back of a spoon. Stir in the Gruyere and Parmesan until melted, then season with salt, pepper, and nutmeg.
Return the cooked mushrooms to the skillet with the cream sauce, add the chopped squeezed spinach, and stir gently but thoroughly until evenly distributed. Taste and adjust seasoning.
Preheat the oven to 375°F (190°C) and lightly grease a 9x13-inch baking dish. Pour the spinach and mushroom mixture into the dish and spread it evenly with a spatula.
Mix the panko breadcrumbs with the olive oil in a small bowl until all crumbs are coated, then sprinkle evenly over the top of the casserole, covering the entire surface.
Bake on the center rack for 25-30 minutes until the top is golden brown and the edges are bubbling. Tent loosely with foil if the breadcrumbs brown too quickly.
Remove from the oven and let rest for 5-10 minutes before serving to allow the sauce to set slightly.