Cook the chicken:
If the chicken is not already cooked, season the chicken breasts or thighs with salt and pepper. Heat 1 tablespoon of olive oil in a large pot over medium heat and cook the chicken for 5-7 minutes per side, until golden brown and fully cooked. Remove from the pot and set aside to shred.
Sauté the vegetables:
In the same pot, add the remaining tablespoon of olive oil. Add the chopped onion, carrots, and celery. Sauté for 5-7 minutes until the vegetables are softened. Add the garlic and cook for another 1-2 minutes, until fragrant.
Make the base of the soup:
Sprinkle the flour over the vegetables and stir to combine. Cook for 1-2 minutes to eliminate the raw flour taste. Gradually add the chicken broth while whisking to prevent lumps. Stir in the dried thyme, rosemary, salt, and pepper. Bring the mixture to a simmer and let it cook for about 5 minutes, until it begins to thicken.
Add the milk and peas:
Slowly stir in the milk (or half-and-half) and bring the soup back to a simmer. Add the frozen peas (and corn, if using) and continue to simmer for another 5 minutes.
Add the shredded chicken:
Stir in the shredded cooked chicken and cook for an additional 2-3 minutes, until heated through. For a creamier soup, you can add the heavy cream at this point. Adjust the seasoning with salt and pepper if necessary.
Serve:
Ladle the soup into bowls and garnish with chopped fresh parsley. If desired, you can top the soup with small pieces of puff pastry or pie crust for a fun "crusty" touch.