This is quite a complex area
Poland actually requires
boats over 7.5 m to have competency certs so this is the flag stage requirement.
In addition however the U.N convention on the law of the sea allows national states to also insist on specific competency when in their waters. To my knowledge Spain requires foreign
boats to have competency certs , since 2015
The easiest answer is to get the
ICC.