In a large pot or Dutch oven, heat the olive oil over medium heat. Add the chopped onion, garlic, carrot, and celery. Sauté for about 5 minutes or until the vegetables start to soften.
Stir in the diced tomatoes, cannellini beans, and red kidney beans. Cook for another 2-3 minutes, stirring occasionally.
Add the chicken or vegetable broth to the pot and bring the mixture to a boil. Reduce the heat to low and let it simmer for about 15 minutes.
While the soup is simmering, cook the pasta separately in a pot of boiling salted water according to the package instructions until al dente. Drain and set aside.
Season the soup with dried oregano, dried basil, salt, and pepper. Adjust the seasonings to taste.
Stir thoroughly after adding the cooked pasta to the liquid. Give it another 5-10 minutes of simmering so the flavors can combine..
Serve hot in bowls, garnishing with grated Parmesan cheese and fresh basil or parsley if desired.