Preheat your oven to 400°F (200°C). Line a large baking sheet with parchment paper.
Toss the pumpkin cubes, onion quarters, and whole garlic cloves with olive oil, salt, and pepper on the prepared baking sheet.
Roast for 25-30 minutes, or until the pumpkin is tender when pierced with a fork and slightly caramelized at the edges.
Transfer the roasted vegetables to a large pot. Add the broth and bring to a simmer over medium heat.
Using an immersion blender, blend until completely smooth. If you don't have an immersion blender, carefully transfer to a regular blender in batches.
Stir in the cream, cinnamon, and nutmeg. Simmer for another 5 minutes.
Taste and adjust seasonings as needed.
Serve hot, garnished with roasted pumpkin seeds if desired.