Preheat oven to 400°F.
Scrub the sweet potatoes and prick them in a few places with a fork. Place them on a baking sheet and bake until soft all the way through, about 45 minutes to 1 hour.
Start the beans and greens about 15 to 20 minutes before the sweet potatoes are done.
In a wide, deep saucepan with a cover, heat the olive oil over low-moderate heat. Add the shallots 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.
To serve, slice each sweet potato lengthwise and push on the ends to open up the middle. Spoon the beans and greens into the center.