Metadata patterns in JDBC are derived from ODBC, and ODBC specifies with regard to the escape:
An escape character, which is driver-specific and is used to include underscores, percent signs, and the escape character as literals. If the escape character precedes a non-special character, the escape character has no special meaning. If the escape character precedes a special character, it escapes the special character. For example, "\a" would be treated as two characters, "\" and "a", but "\%" would be treated as the non-special single character "%".
An escape followed by a non-special is currently not handled correctly, this needs to be fixed.