Heat the olive oil in a skillet over medium heat and sauté the diced onion until translucent and fragrant, about 5 minutes.
Add the minced garlic, cinnamon, and nutmeg to the skillet and cook for another minute, until the spices become aromatic.
Transfer the sautéed onion and spice mixture to the slow cooker and add the chopped pumpkin and vegetable broth. Stir to combine everything evenly.
Cover the slow cooker and cook on low for about 4 hours, until the pumpkin is tender and easily mashable.
Once cooked, use an immersion blender directly in the slow cooker to blend the soup until completely smooth and velvety, or carefully transfer to a blender in batches and puree.
Stir in the coconut milk or heavy cream for added richness, and season with salt and pepper to taste. Warm through for a few more minutes.
Serve the soup hot, garnished with a sprinkle of cinnamon or a swirl of cream if desired, and enjoy the rich, smooth texture and warm aroma.