Heat the oil in a large pot over medium heat. Add the onion, carrots, and celery, season with salt and pepper to taste, and cook, stirring occasionally, until the vegetables begin to soften.
Add the garlic, tomatoes, beans, green beans, broth, potatoes, bay leaves, oregano, and thyme. Bring to a boil and simmer for 25 minutes.
Stir in the pasta and cook, for 10 more minutes, until the pasta is cooked through. Adjust seasonings as needed.
Serve with parsley, red pepper flakes, and grated Parmesan cheese, if desired.