In a wide, deep saucepan with a cover, heat the olive oil over low-moderate heat. Add the onions and cook until softened, about 5 minutes. Add the garlic, rosemary sprig, and red pepper flakes and cook, stirring, for about a minute. Add the beans and cook for 5 minutes, stirring occasionally. Add the kale, cover the pan, and cook, stirring occasionally, for about 5 minutes or until the kale is soft. Remove the rosemary sprig, stir in the lemon juice, and season to taste with salt and pepper.