Heat olive oil in a large pot over medium heat.
Add diced onion and sauté until softened, about 5 minutes.
Stir in minced garlic and cook for another minute, until fragrant.
Add cumin, cinnamon, and optional red pepper flakes, and cook for 1 minute to release the flavors.
Add diced pumpkin and red lentils, stirring to combine.
Pour in vegetable broth and bring the mixture to a boil. Once boiling, reduce the heat to low to ensure a gentle simmer.
Reduce heat, cover, and simmer for 20-25 minutes, or until the pumpkin is tender and lentils are cooked through.
Stir in coconut milk and cook for an additional 5 minutes to thicken.
Season with salt and pepper to taste.
Stir in lemon juice for brightness, if desired.
Serve hot with a side of crusty bread or on its own for a warming, nourishing meal.