I’ve heard both, the former largely from Cantonese speakers, the latter from Mandarin speakers. Not as though I have a large enough sample, though, to say there’s a pattern (and, I think I’ve heard the same people sometimes use both).
Both ‘aiyo’ and ‘aiya’ are acceptable in Cantonese. Actually, the second syllable is often softened to something closer to a schwa nowadays.
Of course, when a Cantonese speaker is REALLY surprised/vexed/pained, more likely than not that will also be accompanied by swearing. ‘Aiya, puk gaai lo, diu!’, for example.
I am not native Chinese but speak Cantonese and lived in Hong Kong for a while. When I read the thread title, without reading the post, I immedately thought “Ai Yaa!” The “Yaa” that I heard in my head is schwaa-ish. Kind of in between the “AW” in "Jaw"and the “O” in “On” sound.