In a large skillet over medium heat, saute onion in oil. Add garlic, pepper flakes if using, and half the kale, and cook a few minutes, stirring until kale is just wilted.
Add the rest of the kale and the canned tomatoes. Salt and cover; bring to a boil.
Reduce to medium and cook until mixture reaches soup consistency, roughly 15 minutes, stirring occasionally.
Add the beans and stir; add the cooked pasta and simmer a couple minutes to mix.
Remove from heat; serve as is with sprinkled cheese on top, or bake in a casserole dish (covered) until cheese melts.