They're very similar SQ wise, but the obvious differences here is that HD238's are open, and ES7 are closed, which means while ES7 isolates better (still not THAT great mind you), 238's have superior soundstage and sound more open. ES7's are also generally more upfront with the mids than the 238's. The highs sparkle about the same (I'd say ES7's are bit better here), and they share about the same level of midbass hump, they hit pretty hard. Lowbass extends a bit better on 238's. 238's are more comfortable to wear while ES7's look better.
Your choice will depend largely on your application but SQ wise, you're getting more or less the same thing.