Heat the olive oil in a large pot over medium heat. Add the onion and garlic and cook until soft and fragrant, about 5 minutes.
Add the flour and stir to coat the vegetables. Cook for another 2 minutes.
Pour in the vegetable broth and bring to a simmer. Add the black beans, green chiles, corn, chili powder, cumin powder, salt and pepper. Simmer for 10 minutes.
Puree with an immersion blender or transfer to a blender in batches to blend until smooth.