Cook spaghetti as package directs.
Heat oil in a large frying pan over medium heat. Add onion and garlic and cook until softened, about 5 minutes. Stir in spinach, wine, chile flakes, olives, pine nuts, salt, and pepper.
Drain pasta, return to pot, and add onion mixture and chicken. Stir to coat and cook over medium heat until warmed, about 4 minutes. Transfer to plates and top with feta cheese.