In a large Dutch oven or heavy pot, heat two tbsp of olive oil. Reduce heat to medium and add the diced potatoes and onions. Cook for about 4-5 minutes, tossing regularly.
Add tomatoes, vinegar, spices, salt and pepper. Stir to combine. Cover and cook for another 4 minutes.
Uncover, add vegetable broth and frozen spinach. Raise heat to medium-high and bring to a boil for 4 minutes or so. Add the kidney beans, cannellini beans, and chickpeas. Bring back to a boil, then reduce heat to medium-low. Cover and cook for another 15 to 20 minutes (potatoes should be tender at this point).
While soup is cooking, make the tomato pesto. In the bowl of a food processor fitted with a blade, place garlic and tomatoes. Pulse a few times to combine. Add basil and puree. While processor is running, drizzle in the olive oil a little bit at a time. Transfer the thick tomato pesto to a bowl, and stir in grated Parmesan.
When soup is ready, remove from heat. Stir in the tomato pesto.
Transfer to serving bowl. Top each bowl with a few basil leaves and toasted pine nuts. Enjoy with your favorite crusty bread!