For now LanguageSelector.score method gives the same score for both { language: 'xml' } and { language: 'xml', pattern: '**/pom.xml' }, but it feels like the second selector should have higher precedence because it's more specific. Even @alexdima assumed the same #129962 (comment)
I'm currently working on an extension for Maven (pom.xml files) and there is a collision with another XML extension because of the issue.