Heat olive oil in a dutch oven over medium-high heat. Add onion and chicken, and sprinkle with a pinch of salt. Saute until chicken is mostly cooked on the outside, about 7 minutes.
Stir in flour to coat chicken, and then stir in pesto. Add chicken broth about ½ c. at a time, stirring well until broth mixture is smooth before adding more. Add ½ c. water, and bring to a simmer.
Stir in pasta and artichoke hearts, and bring to a low boil. Cook for the amount of time recommended on the pasta package. Two minutes before pasta is done, stir in spinach leaves.
Add milk, and return to a simmer. Reduce heat to medium-low, and stir in cheese. Continue stirring until cheese is completely melted and incorporated and soup is heated through.