Preheat oven to 375°F.
Cook pasta according to box directions.
While pasta is cooking, whisk egg in a medium bowl. Add ricotta, half of the mozzarella, milk and pumpkin and stir until smooth and creamy.
Add in shallot, garlic and spices and stir to combine.
When pasta is cooked, drain and then toss with spinach to wilt.
Add pasta to the pumpkin ricotta mixture and stir well to coat all of the rotini. Pour into a small to medium greased casserole dish or a 9x9 greased pan and bake for about 15 minutes or until slight bubbling.
Sprinkle with the rest of the mozzarella and bake another 5-10 minutes or until cheese is melted.
Cool for several minutes before serving.