In a large Dutch oven or soup pot, warm the olive oil over medium heat until it shimmers. Add the onions, celery, and carrot along with a light sprinkle of salt. Cook, stirring from time to time, until the vegetables become soft, about 10 to 15 minutes.
Mix in the garlic, cumin, and red pepper flakes; cook until aromatic, about 30 seconds. Add the beans and broth, then bring to a simmer over medium-high heat. Continue cooking, lowering the heat as needed to keep a gentle simmer, until the broth develops flavor and the beans are very tender, about 30 minutes.
Move about 4 cups of the soup to a stand blender, lock the lid firmly, and blend until smooth (never exceed the maximum fill line, and be careful of the hot steam that escapes from the top). Alternatively, use an immersion blender to puree a portion of the soup.
Pour the pureed soup back into the pot, stir in the cilantro, vinegar or lime juice, and salt and pepper to taste. Serve.