Add the finely chopped yellow onion and celery, and cook until softened, about 5-6 minutes. Stir in the minced garlic, fresh rosemary, red pepper flakes, and tomato paste.
Stir in the ditalini pasta and cook for about 10-12 minutes until al dente. In the last 2 minutes, add the chopped kale or escarole. Season with salt and black pepper to taste.