Heat the olive oil in a large pot over medium heat. Add the onion and cook for 3 minutes until it softens.
Stir in the garlic and cook for 1 minute more.
Add the cubed pumpkin, cumin, cinnamon, smoked paprika, and ginger. Stir to coat the pumpkin with the spices.
Pour in the vegetable broth and add the rinsed red lentils. Bring the mixture to a boil.
Reduce the heat to low, cover the pot, and simmer for 20 minutes until the lentils are tender and the pumpkin is soft.
Stir in the spinach and cook for 2 minutes until it wilts. Season with salt and black pepper.