Sauté the vegetables: Heat the olive oil in a large pot over medium heat. Add the chopped onion, garlic, carrots, and celery. Sauté for 5-7 minutes until softened and fragrant.
- Add zucchini and tomatoes: Stir in the diced zucchini and canned diced tomatoes (with their juices). Cook for another 2-3 minutes, allowing the zucchini to soften slightly.
- Add the broth and beans: Pour in the vegetable broth, kidney beans, and cannellini beans. Stir everything together and bring the soup to a boil.
- Simmer the soup: Once the soup is boiling, reduce the heat to low and let it simmer for 10-15 minutes, until the vegetables are tender and the flavors meld together.
- Cook the pasta: Add the pasta to the soup and continue to simmer for 8-10 minutes, or until the pasta is al dente.
- Add greens and seasoning: Stir in the chopped spinach or kale, oregano, basil, thyme, red pepper flakes (if using), salt, and pepper. Cook for another 2-3 minutes, until the greens are wilted.
- Serve: Taste the soup and adjust seasoning if necessary. Ladle the soup into bowls and garnish with fresh basil or parsley, if desired. Serve with lemon wedges on the side for freshness.