- Preheat the oven to 350°F, with a rack in the highest position that will fit your baking pan. Lightly spray a 2-quart baking dish or an 8-inch square pan with nonstick spray.
- Put on a medium-large pot of water to boil. When the water boils, add the pasta and cook until just tender enough to bite into comfortably, then drain and transfer to a bowl. Toss with a little of the olive oil and set aside.
- Heat the milk—ideally in a spouted measuring cup in a microwave—until it is steaming and too hot to touch, but not boiling. Set the hot milk near the stove.
- Place a medium-large saucepan over medium heat for about a minute, then add the rest of the oil and swirl to coat the pan. Toss in the butter, letting it melt into the oil. Add the mushrooms and ½ teaspoon of the salt and cook, stirring, over medium-low heat for 5 minutes.
- Whisk in the garlic and mustard, then turn the heat to low and sprinkle in the flour, whisking constantly; it will quickly become a paste. Continue to whisk for another 15 seconds or so.
- Keep the pan over low heat as you drizzle in the hot milk, whisking constantly. When the milk is incorporated, whisk in the beer. Turn up the heat to medium and stir constantly with a wooden spoon as you add the chopped spinach and the remaining ½ teaspoon salt. Cook for about 5 minutes, or until the spinach wilts its way into the sauce.
- Remove the pan from the heat and stir in both the cooked pasta and the cheese.
- Taste for salt, add a touch more if you wish, then transfer the mixture to the baking pan. Top with the bread crumbs and walnuts, if desired, and bake uncovered for 15 to 20 minutes, or until bubbly around the edges and crisp and golden on top. (It might look loose on its way into the oven, but it will pull itself together by the time it comes out.) Serve hot.
In a pinch, you can use a 10-ounce package of frozen chopped spinach instead of the fresh. Defrost thoroughly and squeeze as dry as possible ahead of time.