I was in the same boat with 95% of my music on my iPhone showing the dreaded red square in a circle. Thanks to Jerry's post, I can see how to kick off a download playlist-by-playlist over my wi-fi. But the thought of doing that for all my playlists and for 3500 songs made me cringe big time.😠
So I kept fiddling around. I finally got my whole music library back sync'd. Here's what I *think* did it for me, but it would be good for others to try it themselves and post here if it works:
1. connect to iTunes and let it perform it's initial attempt at a resync
2. while connected to itunes, select your phone under DEVICES so that you see the 'Summary', 'Info', 'Apps', 'Music', etc. buttons at the top of the window.
3. select the 'Music' button from the top to see selections for what you want to sync. Here, I could see all the playlists that I have always had selected (prior to iOS7 upgrade). But it seemed that none of it was actually sync'd to the iPhone. So I checked one additional Genius mix to be added. Then I hit 'Sync' button at the bottom right of the window.
4. Voila! now iTunes started to successfully resync my whole music library.
My theory:
During the iOS7 upgrade of the iPhone, the upgrade process whacked the iPhone's index of music and flagged everything as being on the iCloud rather than actually in files on the phone itself. Doing *something* (anything?) to force iTunes to resync was enough for it to fix the index of music on the phone.
Interestingly, iTunes shows how much space is being used for 'Audio' on the phone. Even when the iPhone thought everything was in the iCloud, it was still using up just as much iPhone space as if the files were still downloaded.
Let me know if this works for anyone else. Good luck! 🙂