Coat the bottom of a large pot with the oil and place it over medium heat. Once the oil is hot, add the onion, carrots, and celery. Cook the vegetables for about 10 minutes, stirring occasionally, until they soften a bit. Stir in the garlic and cook it with the vegetables for about 1 minute, stirring constantly, until very fragrant.
Stir in the broth, tomatoes, cannellini beans, green beans, and thyme. Raise the heat and bring the liquid to a boil, then lower the heat and let the soup simmer for about 10 minutes, stirring occasionally.
While the soup simmers, place all of the ingredients for the pistou into a blender or food processor, then blend to a relatively smooth, spoonable paste (Note 1). Give the mixture a taste test and adjust any seasonings to your preference. Set the pistou aside for now.
Stir the ditalini pasta into the soup. Let it continue simmering for 5 minutes, stirring occasionally.
Add the zucchini and yellow squash. Let the soup continue to simmer until the pasta, zucchini, and yellow squash are tender, about 5 minutes more, stirring occasionally.
Remove the pot from heat. Stir in the lemon juice and zest, then season the soup with salt and pepper to taste.
Ladle the soup into bowls and top each one with a dollop of the pistou. Serve.