Heat olive oil in a large pot over medium heat. Add onion, carrots, and celery. Saute 5 minutes until softened. Add garlic and zucchini and cook 2 minutes more.
Add diced tomatoes with juices, beans, broth, and water. Stir in oregano, basil, thyme, salt, pepper, and red pepper flakes if using.
Bring to a gentle boil, then reduce heat and simmer 15 minutes.
Add pasta and cook according to package directions, about 8 to 10 minutes, until al dente.
Stir in spinach or kale and cook 2 minutes until wilted. Taste and adjust seasoning.
Ladle into bowls and top with grated Parmesan and fresh parsley if desired. Serve with crusty bread.