iPod Classic stores the actual tunes in a directory tree structured thus:
/iPod_Control/Music/Fnn/xxxx.mp3
where nn = 00-49 and xxxx are four random capital letters.
Plug in your iPod, and if iTunes starts shut it down again. In File Explorer, make sure you have the "Show hidden files, folders and drives" option checked, then navigate to the iPod (which should be showing up as an external disk in File Explorer,) right-click the iPod_Control folder, select "Properties", uncheck the "Hidden" box and click "OK". You can then copy the Music folder, and everything in it, onto the PC. Which can take a while
You should then be able to import the music files directly into iTunes. If you have the option in iTunes set to organise your library it should copy them into a nicely organised folder structure in the place of your choosing or, as noted above, you can use mp3tag (free from
https://www.mp3tag.de/en/download.html) to move the files prior to importing them.
Dunno about iPod Touch, but I expect it behaves in a similar manner.