In a large pot or Dutch oven, heat the olive oil over medium heat. Add the chopped onion and sauté for 5-7 minutes, or until translucent.
Stir in the minced garlic and ginger, cooking for another 1-2 minutes until fragrant.
Add the diced chicken thighs to the pot, season with salt and pepper, and cook for about 5-6 minutes, or until the chicken is browned on all sides.
Sprinkle in the curry powder, cumin, coriander, turmeric, and red chili flakes (if using). Stir well to coat the chicken and cook for an additional minute.
Pour in the coconut milk and diced tomatoes, stirring to combine. Bring the mixture to a gentle simmer.
Add the cooked lentils to the pot. Mix everything together and let it simmer for 15-20 minutes.
In the last 5 minutes of cooking, stir in the spinach until wilted and heated through.
Once everything is cooked and heated through, taste and adjust seasoning if necessary. Serve the curry in bowls over cooked jasmine or basmati rice.