"useless" pure math often turns out to have scientific applications.
And surely you don't mean all pure math, so your argument ends up being circular --- useless math is useless. You happen to think that this math is useless, but you might be, or turn out to be, wrong.
Also, you're misusing the term "self-referential". You seem to mean that it's a closed system ... but it's not, since mathematicians interact with it.
Finally: so what? We do all sorts of enjoyable activities with no benefit other than the enjoyment. Solving Erdős problems seems at least as justifiable as finding the trillionth digit of pi or writing an Apple ][ emulator in Brainfuck or playing those video games that you demonize by calling them addictive. (Compare to, say, compulsively reading Britannica's The Great Books of the Western World ... it's snooty judgments all the way down.)
Postscript to finally: This framework has wider application ... it's not limited to Erdős problems or anything else that someone happens to consider to be useless.