Preheat oven to 425°F (200°C).
Halve the pumpkin and scoop out the seeds. Slice each pumpkin halve in quarters. Prick the sweet potato a few times with a fork (if using). Brush pumpkin quarters and sweet potato with a little olive oil and place onto a baking sheet lined with parchment paper. Roast for about 40 minutes or so, until the flesh is soft.
Heat the coconut oil in a large pot over medium heat and roast the onion for about 6-8 minutes until translucent. Add the garlic and ginger and roast for 1 minute longer while stirring.
Peel the sweet potato and add along with the pumpkin flesh and spices to the pot. Pour in the broth and coconut milk. Bring to a boil, then reduce heat and simmer for about 5-10 minutes, to give the flavors time to meld.
Remove the soup from heat and either blend this soup in the pot using an immersion blender, or transfer to a blender in batches and blend until smooth and creamy.
Taste and adjust seasonings if necessary. Add more broth if you prefer a thinner consistency.
Serve with some peanuts, pumpkin seeds, chopped parsley and a swirl of coconut cream as garnish, if you like.