Meanwhile, heat olive oil over medium-low heat in a large skillet. Sauté garlic and onion for 2 minutes. Add tomatoes and continue to cook an additional 2-3 minutes. Add beans and spinach and continue to stir and cook until spinach has softened, about 2-3 minutes.
Stir flour into vegetable broth and add to pan. Add drained pasta to pan and stir to heat through. Add salt and pepper to taste.