In a large pot, heat the olive oil over medium heat. Add the diced onion and sauté until translucent, about 5 minutes.
Stir in the minced garlic, diced carrots, and diced celery. Cook for another 5 minutes until the vegetables are softened.
Add the dried oregano, dried basil, and red pepper flakes (if using). Stir well to combine and cook for 1 minute until fragrant.
Pour in the vegetable broth and add the diced tomatoes along with their juice. Bring the mixture to a boil.
Once boiling, add the cannellini beans and pasta. Reduce the heat to a simmer and cook for about 10-12 minutes, or until the pasta is al dente.
Season with salt and pepper to taste. Remove from heat and let it sit for a few minutes to thicken slightly.
Serve hot, garnished with fresh parsley and grated Parmesan cheese if desired.