Bring a large pot of salted water to a boil. Add the pasta and cook until al dente, 10 to 12 minutes. Drain the pasta and set it aside.
While the pasta is cooking, in a medium saucepan set over medium heat, whisk together the milk and pumpkin puree. Warm the mixture until it is hot but not boiling, about 5 minutes. Remove the pot from the heat and set aside.
Heat the butter in a large heavy-bottomed stockpot set over medium heat. Once the butter has melted, whisk in the flour and cook, whisking constantly, until the mixture becomes light brown in color and has a slightly toasted aroma, about 3 minutes.
Whisk in the nutmeg, then remove the pot from the heat and slowly whisk in the pumpkin mixture. It will thicken, then thin out gradually and become smooth as you continue whisking.
Return the pot to medium heat and whisk in the Gruyère cheese, cheddar cheese, salt and pepper. Cook until the cheese is melted, about 2 minutes.
Stir the pasta into the sauce until combined and serve.