In a large pot over medium heat, add the oil, onion, carrot, and ½ teaspoon salt. Cook until the veggies have softened, about 3-5 minutes, stirring occasionally.
Add the ginger, turmeric, black pepper, and red pepper flakes (if using), and cook for 30 seconds, stirring constantly. Add the water, lentils, and remaining ¼ teaspoon salt. Bring to a boil over high heat, then give it a stir. Cover and reduce the heat to low to maintain a simmer for 20 minutes, stirring halfway through, or until the lentils have broken down.
Stir in the spinach or greens and simmer until wilted/thawed, about 2 minutes. Turn off the heat. Transfer about ½ cup of the soup to a bowl and add the miso paste. Mash it up with a fork to dissolve the miso, then stir it back into the soup. Stir in the lemon juice.
Serve topped with yogurt, herbs, and nuts.