Preheat oven to 180°C (350°F).
Cut pumpkin in half, remove seeds, and place cut-side down on a baking sheet. Roast for 40-45 minutes, or until tender.
While pumpkin is roasting, heat olive oil in a large pot over medium heat. Add onion and cook until softened, about 5 minutes.
Add garlic, cumin, coriander, and cayenne pepper (if using) and cook for 1 minute more.
Scoop out the roasted pumpkin flesh and add it to the pot. Pour in vegetable broth and bring to a boil.
Reduce heat and simmer for 15 minutes.
Use an immersion blender to blend the soup until smooth. Alternatively, carefully transfer the soup to a regular blender and blend until smooth.
Stir in coconut milk and season with salt and pepper to taste.
Serve hot.