Heat oil in a large pot over medium heat.
Add onion, carrots, celery, salt, and pepper. Cook for 8 minutes, stirring occasionally.
Add garlic, tomatoes, beans, green beans, broth, bay leaves, oregano, and thyme. Cover and simmer for 20 minutes.
Stir in pasta and cook, uncovered, for 10 minutes until the pasta is tender.
Season to taste and serve with parsley, red pepper flakes, and Parmesan if desired.