As a former sound engineer, I'd say that the audio quality on most Apple iPods is generally not that great (the original white iPod shuffle being a notable exception), so your comment regarding the iRiver doesn't surprise me. It wouldn't hurt to compare you iPhone against another unit though just in case.
There is a problem with the built-in iPod and iPhone EQ settings in that they boost the bass without reducing overall level, thus causing the signal to 'clip' and producing audible distortion. Given that many CDs are mastered for maximum volume, there's not much you can do about this other than turning the EQ off or selecting a different setting. The same effect is audible in iTunes, although you can use the 'preamp' setting to reduce the volume level before the bass boost is applied, thus minimising any clipping. Some types of music and CDs are worse than others, so not everybody will notice this problem, but it can sometimes be quite pronounced.
I have reported this as a bug to Apple in the past and suggest that yourself and others do the same in the hope that they will fix it by applying a similar 'preamp' boost or cut appropriate to each of the built-in EQ settings to avoid the distortion.