In a large saucepan, heat oil over medium heat. Add onion, rosemary, and thyme. Cover and cook until onion is soft, about 8 minutes. Add garlic and cook 1 minute more. Stir in broth and drained beans, increase heat to high, and bring to a boil. Reduce heat and simmer 5 minutes.
Using a slotted spoon, transfer 2 cups of the beans to a bowl and set aside. Puree remaining soup in 3 small batches in blender until smooth. Return soup and beans to saucepan; heat to a simmer. Stir in spinach.