Another trick, if the accounts aren't Google account contacts, is to use
MyPhoneExplorer. Sync the contacts there, then copy each contact that's not a Google contact, paste it and edit the pasted contact to make it a Google contact. (Then delete the original one.) Put the phone on airplane mode, delete all the contacts, sync back from MyPhoneExplorer to the phone, go to
Google Contacts and delete everything, then turn off airplane mode and sync the contacts. Now they're all Google account contacts (which all contacts should be entered as) and they're on Google contacts, so they'll sync to any phone on that account.