Does EASA have access to medical records outside of the EU?
No, EASA cannot access anything.

You will be asked to bring your medical records to the exams. Neither EASA nor your examining doctor is able to access any of your medical records without your consent. It's restricted personal information.

Some countries already have medical records in digital (computerized) form, but many still rely on written data. In any case, EU institutions have no jurisdiction outside of EU.

You will also be given a questionnaire that will include a checkbox for any known medical conditions you have (or had in the past). I don't know what your condition is/was, but it might be a good idea to consult a private examiner first before checking anything on the list that might prevent you from getting a certificate issued.