Heat olive oil in a large pot over medium heat. Add chopped onion and cook for 3–4 minutes until softened.
Stir in minced garlic and cook for 30 seconds until fragrant.
Add crushed tomatoes, cannellini beans, and kidney beans. Stir to combine.
Pour in broth and add Italian seasoning, salt, and black pepper. Bring to a gentle boil.
Reduce heat to low and simmer uncovered for 15–20 minutes to develop flavor.
Stir in pasta and cook for 8–10 minutes, until pasta is tender.
Taste and adjust seasoning before serving.
Serve hot with grated Parmesan if desired.