Combine diced onion and minced garlic in a pot and sautée with olive oil over medium heat for about 2 minutes, until onions are soft.
Add flour and chili powder to the pot and stir for about 2 minutes.
Add pinto, kidney and black beans to the pot along with corn, vegetable broth, tomato sauce and diced tomatoes. Stir to combine and ensure that flour is dissolved.
Add in macaroni, increase to high heat, and place the lid on the pot. Once the pot has come to a boil, turn to low heat and allow to simmer for 13-15 minutes. Stir occasionally to prevent macaroni from sticking to the bottom.