Preheat the Oven: Preheat the oven to 375°F (190°C).
Caramelize the Onions: Melt 2 tablespoons of butter in a large skillet over medium-low heat. Add the sliced onions and cook for 35 to 45 minutes, stirring occasionally, until deeply golden, soft, and caramelized. Reduce the heat if the onions begin to brown too quickly. Add a splash of water as needed to loosen any browned bits from the skillet. Transfer to a bowl and set aside.
5 tablespoons unsalted butter, 4 medium yellow onions
Blanch the Green Beans: Bring a large pot of water to a boil and add the kosher salt. Add the green beans and cook for 4 to 5 minutes, until bright green and crisp-tender. Immediately transfer to an ice bath or rinse thoroughly under very cold running water to stop the cooking. Drain well to prevent excess moisture from thinning the sauce.
2½ pounds green beans, 1 teaspoon kosher salt
Make the Mushroom Cream Sauce: In a small bowl, whisk together the flour, bouillon, black pepper, and nutmeg. In the same skillet used for the onions, melt the remaining 3 tablespoons of butter. Add the sliced mushrooms and cook for 6 to 8 minutes, stirring occasionally, until golden and tender. Sprinkle the flour mixture over the mushrooms and stir for 1 minute. Gradually pour in the milk and cream, stirring constantly. Simmer gently for 4 to 5 minutes, until the sauce begins to thicken. Reduce the heat to low. Add the Parmigiano Reggiano and half of the shredded Gruyère (about 200 g). Stir until the cheese melts and the sauce is smooth and creamy. If the sauce becomes too thick, add a splash more milk.
16 ounces baby bella mushrooms, ½ teaspoon ground black pepper, 1 teaspoon Knorr chicken bouillon, 2 tablespoons all-purpose flour, ¼ teaspoon ground nutmeg, 1½ cups whole milk, 1½ cups heavy cream, ½ cup Parmigiano Reggiano, 16 ounces Gruyère cheese
Assemble the Casserole: Spread the well-drained green beans evenly into a 9 × 13-inch casserole dish. Pour the mushroom cream sauce over the beans. Distribute the caramelized onions evenly over the sauce, then sprinkle with the remaining shredded Gruyère (about 200 g).
Add the Topping and Bake: Sprinkle the breadcrumbs evenly over the casserole. Bake uncovered at 375°F (190°C) for approximately 25 minutes, until hot, bubbly around the edges, and golden on top.
1 cup dry breadcrumbs
Rest and Serve: Let the casserole rest for 10 minutes before serving. This allows the sauce to settle slightly and makes serving easier.