Heat oven to 400°F. Lightly grease a 9x13-inch baking dish.
Boil pasta in well-salted water until 1–2 minutes shy of al dente. Reserve some cooking water, then drain.
Warm olive oil in a large skillet over medium heat. Soften shallot for 2–3 minutes.
Stir in garlic and cook 30 seconds. Whisk in pumpkin, milk, and broth until smooth.
Season with sage, nutmeg, red pepper flakes, salt, and black pepper. Simmer gently for 3–5 minutes.
Take off heat. Fold in ricotta and Parmesan until creamy and well combined.
Toss drained pasta and spinach with the warm sauce. Splash in a little reserved water if needed to loosen.
Combine breadcrumbs with melted butter in a bowl until evenly moistened.
Spread pasta mixture in the baking dish. Top with mozzarella, then sprinkle on the buttery crumbs.
Bake until bubbling and golden, 18–22 minutes. Rest 5 minutes, then garnish with parsley and serve.