Drain and rinse 3 (about 15-ounce) cans white beans. Transfer half of the beans to a medium bowl and mash with a potato masher or bottom of a flat measuring cup until mostly smooth.
Heat 2 tablespoons olive oil in a Dutch oven or medium pot over medium heat until shimmering. Add 1 diced medium yellow onion, 1 sliced medium carrot, 1 diced medium celery stalk, 2 fresh rosemary sprigs, 3 minced garlic cloves, 1 1/2 teaspoons kosher salt, and 1/4 teaspoon red pepper flakes if using. Cook, stirring occasionally, until softened, 5 to 8 minutes.
Stir in the whole and mashed beans and 1 (32-ounce) carton low-sodium vegetable broth. Bring to a boil over medium-high heat. Reduce the heat to maintain a simmer and cook for 10 minutes to allow the flavors to meld.
Remove and discard the rosemary sprigs. Stir 1 small bunch coarsely chopped flat-leaf kale leaves into the soup and simmer until the kale is tender and vibrant green, 3 to 5 minutes.
Remove the pot from the heat. Stir in 3 tablespoons lemon juice. Taste and season with more kosher salt as needed.
Recipe Notes