Prep the vegetables. Dice the onion, carrots, and celery into small, even pieces.
Mince the garlic. Cut the potato, zucchini, and green beans as noted. Rinse and drain the canned beans.
Sweat the aromatics. In a large pot, warm 2 tablespoons of olive oil over medium heat.
Add onion, carrot, and celery with a pinch of salt. Cook, stirring often, until soft and slightly golden, about 8–10 minutes. Add the garlic and cook 30 seconds more.
Build the base. Stir in tomato paste and cook for 1 minute to caramelize it slightly.
Add canned tomatoes with their juices, broth, bay leaf, oregano, thyme, and red pepper flakes if using. If you have a Parmesan rind, add it now.
Simmer the hearty vegetables. Add the diced potato and green beans. Bring to a gentle boil, then reduce to a simmer.
Cook uncovered for 12–15 minutes, until the potatoes are just tender.
Add beans and zucchini. Stir in the cannellini or kidney beans and the zucchini. Simmer another 5–7 minutes. Taste and adjust with salt and pepper.
Cook the pasta separately. In a small pot, cook the pasta in salted water until just shy of al dente.
Drain. This prevents the soup from turning starchy and keeps leftovers from becoming mushy.
Finish the soup. Remove the bay leaf and Parmesan rind. Stir in the chopped spinach or kale and cook until wilted, 1–2 minutes.
Add a squeeze of lemon for brightness and a drizzle of olive oil.
Combine and serve. Add a scoop of pasta to each bowl and ladle the soup over it. Top with grated Parmesan and chopped parsley or basil. Add black pepper to taste.