Heat the olive oil in a large pot over medium heat. Add the onion and garlic and cook until the onion softens.
Add the carrots, red bell pepper, and zucchini. Stir and cook for about five minutes until the vegetables start to soften.
Pour in the diced tomatoes and vegetable broth. Bring the mixture to a simmer.
Add the cannellini beans and small pasta. Cook for 10 minutes, stirring now and then, until the pasta is tender.
Stir in the spinach and cook for two more minutes until it wilts. Season with salt and black pepper.
Ladle the soup into bowls and top each serving with a spoonful of pesto.