Preheat the oven to 375°F (190°C). Lightly grease a small-to-medium casserole dish or a 9-inch square baking dish.
Cook the pasta according to the package directions until just al dente. Avoid overcooking it since the pasta will continue cooking in the oven.
While the pasta cooks, combine the ricotta, beaten egg, pumpkin purée, 1 cup mozzarella, Parmesan, vegetable broth, and cream in a medium mixing bowl. Stir until smooth and creamy.
If the pumpkin mixture seems too thick, stir in a small splash of additional vegetable broth, cream, or milk.
Add the shallot, garlic, oregano, Italian seasoning, crushed red pepper, black pepper, salt, and nutmeg. Stir until evenly combined.
Drain the cooked pasta and immediately toss it with the baby spinach. The residual heat from the pasta will help wilt the spinach.
Add the pasta and spinach to the pumpkin-ricotta mixture. Gently stir until every piece of pasta is generously coated.
Transfer the mixture to the prepared baking dish and spread it into an even layer.
Bake the Pumpkin Ricotta Pasta Bake for about 15 minutes, or until the sauce begins to bubble around the edges.
Sprinkle the remaining 1/2 cup mozzarella over the top. Return to the oven for another 5–10 minutes, until the cheese is completely melted and lightly golden in spots.
Let the pasta bake rest for 5–10 minutes before serving.