iTunes is working as designed. "Syncing" of media content in iTunes is generally one way, from iTunes library on computer to iPod. That is why you get that warning message, because iTunes is asking if you want to sync your current iTunes library to the iPod.
Therefore, you cannot transfer song files from iPod to computer using iTunes (except for songs purchased from the iTunes Store). However, there are third-party methods and utilities that can transfer from iPod to computer. If you do a Google search on something like "iPod transfer," you should get some links.
Once the song files are on your computer's hard drive, you can add them to your iTunes library. Once the song files are in your iTunes library, you can sync them to your iPhone and iPad.
NOTE: For previous purchases from the iTunes Store, made on any of your computing devices, you can also re-download them at no cost from the iTunes Store Purchased screen. The link to Purchased is on the iTunes Store Home screen, under QUICK LINKS.