Heat the oven to 375°F and butter a 2-quart baking dish. Bring a large pot of water to a boil with 1 tablespoon salt. Add the green beans and cook for 4 to 5 minutes, until bright green and crisp-tender. Drain, plunge into a bowl of ice water to stop the cooking, then drain again and pat dry.
Melt the butter in a large skillet over medium-high heat. Add the mushrooms and cook, stirring occasionally, for 6 to 8 minutes, until their liquid evaporates and they are browned. Add the onion and cook 3 minutes, then the garlic for 30 seconds.
Sprinkle the flour over the mushrooms and stir for 1 minute. Slowly whisk in the broth, then the milk. Simmer, stirring, for 3 to 4 minutes, until thick and creamy. Season with the salt, pepper and nutmeg, and stir in the Parmesan.
Fold the green beans and half of the fried onions into the sauce, then spread the mixture in the prepared baking dish.
Bake for 20 minutes, until bubbling at the edges. Top with the remaining fried onions and bake 5 to 8 minutes more, until the onions are golden.
Let the casserole rest for 5 minutes before serving.