In a large pot, heat the olive oil over medium heat. Add the diced onion and sauté for about 3-4 minutes until softened.
Stir in the garlic, bell pepper, carrot, and celery. Cook for an additional 5 minutes, stirring occasionally.
Add the oregano, cumin, chili powder, and red pepper flakes. Cook for 1 minute until fragrant.
Pour in the chicken broth and diced tomatoes. Bring the mixture to a boil.
Add the chicken breasts to the pot. Reduce the heat to a simmer and cover. Cook for about 20 minutes, or until the chicken is cooked through.
Remove the chicken from the pot and shred it with two forks. Return the shredded chicken to the pot.
Stir in the corn and black beans. Simmer for another 5 minutes until heated through.
Season with salt, pepper, and lime juice to taste.
Serve hot, garnished with chopped cilantro and a dollop of sour cream if desired.