|One of the problems created by non-ideal headphones is distortion, which actually adds frequencies to the signal that have not been there before.
I don't see why this problem is fundamentally non-correctable. Lets put all the issues aside for a moment related to real time DSP of the signal and say that we would do all of the processing before hand (make a new wav out of the original wav). If we can prove the concept under this condition then we can worry about how to make it more practical for semi-real time processing. At the very least we would have a technique where you could preprocess all of your songs and create duplicate wav (or lossless) files for all of your music. This is probably too much of a burden for the average listener but I'm certain that at least some people are obsessed enough with quality that they would put up with such inconviences.
Correcting for distortion would be similar to active noise cancling noise headphones. Active noise cancling headphones work surprisingly well. Just think how skeptical you would be of the process if someone described it to you years before it was sucessfully implemented. The problem with active noise cancling headphones is the huming (and other problems) is related to the fact that 1.) all of the signal processing must be done onboard on a tiny processer and 2.) the noise you are correcting for is unknown until you hear it therefore it must be corrected in real time. With the distortions in music due to the crappy response of the headphones, the distortion should be very reproducable and deterministic so that you could anticipate the distortion from the beginning and optimize a correction for it. As long as you can output all of the frequencies of the distortion with the headphone then you should be able to correct for them.
My initial intention was to take a decent headphone and correct it to great. Obviously a $10 pair of headphones would be less correctable than a $100 pair and may not even be worth the effort.
Image if someone created a device where you essentially put a microphone (possibly enclosed in a synthetic ear) up to one of your headphone cups and drove your headphones with a battery of test signals and listened for the distortions and recorded a profile for the headphones (a model equation for their behavoir with nonlinear terms). Then you feed your songs through software and the software outputs a corrected song. There are obviously problems that need to be worked out in the design to make it more practical, but there would definitely be a market for it.
In my mind, there is nothing that theoretically limits a correction. I can't prove it, but I do have a strong feeling that if your headphones are causing distortions in a song you are playing, there exists a modified version of that song that will come out transparent. The question to debate is whether there is an easy way of obtaining this modified signal, whether the optimal modified signal required is so sensative to environment (temperature, humidity, hours of operations) that it is only valid for a very short time, and whether the cost of producing such a system outweighs the equivalent enhancement of your headphones (e.g. A $200 system can make $100 headphones sound like $200 headphones is not worth it, just buy $300 headphones).
Whether or not the technique is feasible for full scale production does not make it any less interesting from a scientific signal processing and dynamic controls point of view.