Turkey is a secular State which means that the Turkish Government maintains a neutral position on religions and does not favour one religion over the other. Nor does it incorporate religious philosophy or doctrines into policy formulation or laws or any other way in which it governs Turkey.
This secularism is compatible with EU membership.
Erdogan was prosecuted and imprisoned for the offence of inciting religious hatred by repeating in public such verses.
This happened 15 years ago.
Erdogan broke Turkish law then when he repeated the verses and would break Turkish law again today if he repeated the verses. He would be imprisoned today under Turkish law if he repeated the verses again publicly.
Such views as represented by the verses have never been presented by any Turkish Government as being with official sanction.
Such views as represented by the verses would not be tolerated under EU policies and would be grounds for rejecting the application of Turkey to join the EU if they represented official Turkish Government views.
Nor would they be tolerated under UK law.