01 - Preheat the oven to 375°F.
02 - Bring a large pot of salted water to a boil. Add the green beans and cook for 4-5 minutes until just tender and bright green. Drain and immediately transfer to an ice bath to stop cooking. Drain well and set aside.
03 - In a large skillet over medium heat, melt the butter. Add the chopped onions and cook for 2-3 minutes until softened. Stir in the garlic and mushrooms, and sauté until the mushrooms release their liquid and become golden brown, about 5-6 minutes.
04 - Sprinkle the flour over the vegetables and cook, stirring constantly, for 1 minute. Gradually whisk in the milk, vegetable broth, and heavy cream. Add salt, pepper, and nutmeg. Cook, stirring, until the sauce thickens, about 3-4 minutes.
05 - Remove from heat. Add the blanched green beans to the sauce, tossing to coat evenly.
06 - Transfer the mixture to a lightly greased 2-quart baking dish. Bake uncovered for 20 minutes.
07 - Remove from the oven, sprinkle the crispy fried onions evenly over the top, and return to the oven. Bake for an additional 10 minutes, or until the onions are golden and the casserole is bubbling.
08 - Let cool for 5 minutes before serving.