In a large pot or Dutch oven, melt butter over medium heat. Add onion and cook until softened, about 5 minutes. Add garlic and cook for 1 minute more.
Add chicken broth, Italian seasoning, onion powder, garlic powder, and crushed red pepper flakes. Bring to a boil, then reduce heat and simmer for 10 minutes.
Add chicken breasts and cook until cooked through, about 15-20 minutes. Remove chicken and shred. Return shredded chicken to the pot.
In a small bowl, whisk together milk and flour until smooth. Gradually whisk into the soup. Bring to a simmer and cook until thickened, about 5 minutes.
Stir in sundried tomatoes and gnocchi. Cook until gnocchi are tender, about 3-5 minutes.
Stir in spinach, salt, and pepper. Cook until spinach is wilted, about 1 minute.
Serve immediately.