Heat olive oil in a large pot over medium heat. Add onions, carrots, and celery. Sauté for about 5 minutes until softened.
Stir in garlic and cook for another 30 seconds until fragrant.
Add diced tomatoes, vegetable broth, oregano, thyme, bay leaves, and red pepper flakes. Bring to a simmer.
Stir in beans and green beans. Cook for 15 minutes.
Add pasta and cook until al dente (about 8-10 minutes). Stir occasionally to prevent sticking.
Remove bay leaves, season with salt and pepper. Stir in fresh parsley.
Serve hot with a sprinkle of Parmesan cheese and a side of crusty bread.