To a medium pot, heat oil over medium heat. Once hot, add onion and cook for 3-4 minutes until lightly golden.
Add green chilies, garlic, and the spices - cumin, coriander, cinnamon, and red pepper flakes (optional). Stir and fry for 2-3 minutes or until fragrant.
Add lentils, canned tomatoes, eggplants, coconut milk, vegetable broth, salt, and black pepper. Stir and bring to a boil. Simmer for 25-30 minutes with a lid on, stirring occasionally to prevent burning.
Remove from the heat. Taste to see if the lentils are cooked trough, and add more salt or black pepper if needed.
To finish, add lime juice and cilantro and stir (both optional). Serve right away!