Heat the olive oil in a large pot over medium heat.
Add the diced onion, carrots, and celery to the pot and cook for 6 to 8 minutes, stirring often, until the vegetables are softened but not browned.
Add the minced garlic, ground cumin, smoked paprika, dried thyme, and bay leaf and cook for 30 seconds, stirring constantly, until fragrant.
Add the rinsed lentils, diced tomatoes with their juice, vegetable broth, water, and 1 teaspoon of the salt to the pot and stir well.
Bring the soup to a gentle boil.
Reduce the heat to low, cover, and simmer for 25 minutes, stirring occasionally to prevent sticking.
Add the diced zucchini and green beans to the pot and continue simmering uncovered for 10 to 12 minutes, until the lentils are tender and the vegetables are cooked through.
Remove and discard the bay leaf.
Stir in the remaining ½ teaspoon salt, black pepper, and lemon juice.
If using, stir in the chopped kale or spinach and cook for 2 to 3 minutes, just until wilted.
Taste and adjust seasoning as needed.
Remove the soup from heat and let it rest for 5 minutes before serving.