Will updating my iPad to iOS 5 cause me to lose media? (the answer is YES)
iDevices are designed to be linked to an iTunes library where they get their content. If you've never trusted iTunes before and been manually copying items onto your iDevice then you're just making it hard on yourself.

Synchronizing your files and upgrading the iOS are separate steps. I would recommend you get the iPad linked to your iTunes library properly and synchronization figured out before trying to upgrade lest you lose your iPad content in the process.

First, make sure your iTunes and your iPad are registered to the same AppleID you used to download your apps and other iTunes store items. (This may already be the case if it's telling you about purchases, but check.)

Next, download your past purchases to your Mac.

For other items like your own music and video files, the synchronization is one-way. If they're not in your iTunes then they won't sync back from your iPad.

Try using manual mode for those items if you're happy leaving well enough alone with keeping those items on your iPad.

Otherwise, you'll have get these from your original source (ideally) or use a third-party utility to extract the files from the device. It's been a while since I've had to do that myself, but as I recall it was a bit messy since the files lost their original filenames when they were stored in the device's filesystem/database. At least I think you can get them out somehow, but yes, it might be buggy.

The key is to have everything in iTunes before allowing the iOS upgrade to remove anything from the iPad. In my own experience, everything was right back where it was after the iOS upgrade, even though I had some similar warnings, but if you don't already have the items in iTunes then it might be a different story.