Preheat the oven to 400°F (200°C). Cut the pumpkin in half, scoop out the seeds, and place it cut-side down on a baking sheet. Roast for 30-40 minutes, or until the flesh is tender and easily pierced with a fork. Let it cool slightly, then scoop out the flesh and set it aside. (If using canned pumpkin puree, skip this step.)
- Cook the pasta according to the package directions. Drain and set aside, reserving 1/2 cup of the pasta cooking water.
- While the pasta is cooking, heat olive oil in a large skillet over medium heat. Add the sliced mushrooms and cook until they release their moisture and become golden brown, about 8-10 minutes.
- Add the minced garlic and cook for an additional minute until fragrant.
- Add the roasted pumpkin flesh (or canned pumpkin puree) to the skillet along with the vegetable broth. Stir until the mixture becomes smooth and well combined.
- Add the heavy cream (or coconut cream) and ground nutmeg, and stir to create a creamy sauce. Season with salt and pepper to taste. If the sauce is too thick, add a little reserved pasta cooking water to reach your desired consistency.
- Add the spinach to the skillet and stir until it wilts into the sauce.
- Toss the cooked pasta into the pumpkin sauce and stir until the pasta is well coated. Add fresh herbs like sage or thyme if using.
- Serve the pasta warm, topped with freshly grated Parmesan cheese if desired.