Yes, many insurers will take into account your no-claims bonus from outside of Spain if it comes from an EU country. Other countries may also be accepted.