Start by preheating your oven to 350°F. While it heats, butter your casserole dish or coat it lightly with nonstick spray. This little step keeps your mac and cheese from sticking once it's baked and bubbly.
Bring a large pot of salted water to a boil and cook your pasta according to the package directions, usually around 7 to 10 minutes. Drain it well once it's tender, and set it aside while you build the sauce.
Melt your butter in a large pan over medium heat until it starts to bubble gently. Whisk in the flour and keep stirring constantly for a couple of minutes until it turns a light golden color and smells nutty.
Slowly pour in the milk while whisking the whole time to prevent lumps from forming. Keep cooking and stirring until the sauce thickens and starts to bubble around the edges of the pan.
Reduce the heat to low and stir in your salt, pepper, nutmeg, and Dijon mustard. Add the pumpkin puree along with most of your grated cheese, stirring until everything melts into a smooth, glossy sauce.
Fold the cooked pasta into the sauce until every piece is coated, then transfer it to your prepared baking dish. Top with the remaining cheese and bake uncovered for about 25 minutes until the top turns golden and bubbly.