Heat 3 tablespoons butter or oil in a large pot over medium-high heat. Add half the mushrooms and half the shallots; cook, stirring occasionally, until most of the liquid has evaporated and the mushrooms are well browned, 10 to 12 minutes. Transfer mushrooms to a bowl and repeat with remaining butter, mushrooms and shallots.
Return all mushrooms to the pot and stir in tomato paste, thyme, cumin, coriander, cinnamon and allspice; cook until fragrant, about 1 minute.
Stir in 5 cups water, the salt and the black pepper. Bring mixture to a simmer over medium heat and cook gently for 20 minutes. Stir in baby spinach and let cook until just wilted, 1 to 2 minutes.
Using an immersion blender or food processor, coarsely purée soup. Mix in lime juice. Thin with water, as needed. Taste and adjust seasoning, if necessary. Serve with dollops of yogurt if you'd like.