To catch both cases in one go, you could use an alternation inside the XPath expression:
my @nodes = $xpc->findnodes('e:EARTHSTATS | EARTHSTATS', $doc);
An alternative solution that does not require registering the namespace, would be to use the local-name XPath function:
my @nodes = $doc->findnodes('*[local-name()="EARTHSTATS"]');
Of course neither of those solutions is very pretty, but unfortunately that's just how XPath 1.0 works when dealing with inconsistently namespaced input.
Things are better with XPath 2, but XML::LibXML doesn't have support for that (nor does any other Perl module that I'm aware of).