A software modem (modulator-demodulator). We nowadays think of modem as the squeaky card that were used in the days of dial up to connect to the internet, but a modem is simply just a device used to convert digital signal to analog sound signal and back again. The hardware in the receiving end also had to implement a modem with the same protocol.
Needless to say this will probably be a very slow connection, and implementing such modem will involve a lot of programming and so is out of topic for Android SE.
The audio jack carried very little power, it may be possible to use it to power very simple devices like Square and the like, but in general it's too small for general purpose use.
However I doubt that Square actually had a full modem stack for general purpose data transfer, they probably just implemented a custom protocol that are specifically geared for their particular use case. And so is the Shuffle.