Heat olive oil in a large pot over medium heat. Add onion; cook and stir until tender, about 6 minutes. Add garlic; cook until fragrant, about 1 minute. Stir in tomato paste and red pepper flakes.
Pour chicken broth and diced tomatoes into the pot. Bring soup to a simmer. Add pasta; cook until tender yet firm to the bite, 6 to 8 minutes. Stir in chicken; simmer until heated through, about 5 minutes.
Mix mozzarella cheese and Parmesan cheese into the soup before serving. Season with salt and pepper.