Major edit: My bad, I mistook the just working function isNumeric() for a HQL function which is wrong. According to the doc HQL supports database scalar functions - and SQLServer (on which I tested) has an isNumeric() function.
I see two options now:
Option 1: You can write different HQLs for different databases which utilizes the build in functions like isNumeric() on SQLServer (but that's a huge step back in terms of "write once run everywhere")
Option 2: Write for every database you want to be compliant with a custom function in SQL and register it with the same name in your dialect.
I know, both options aren't terrific but I can't think of any other way to get it working.