Does the 目 mean 'eye' in this case? What does Au mean in this case? The pain and the 目 coming together to experience the hurt?
Is this a one-off sentence or can I use other variations like 苦しい目にあう (only negative ones?) or 楽しい目にあう?
Does the 目 mean 'eye' in this case? What does Au mean in this case? The pain and the 目 coming together to experience the hurt?
Is this a one-off sentence or can I use other variations like 苦しい目にあう (only negative ones?) or 楽しい目にあう?
「目{め}」 has far more meanings than J-learners tend to think. A decent dictionary would give over ten.
Does the 目 mean 'eye' in this case?
No, it does not. 「目」 here means "experience", so 「痛{いた}い目」 means a "bitter experience".
What does Au mean in this case?
「あう」 used in this expression means "to encounter", "to go through", etc.
So, "to get a black eye" is not what this expression means at all. That is unless getting a black eye was coincidentally the end result from your bad experience.
Is this a one-off sentence?
No, it is not.
「苦{くる}しい目にあう」 is just perfect.
「楽{たの}しい目にあう」 would be less common but still okay.
The adjectives that are used often in 「~~目にあう」 are:
ひどい、散々{さんざん}な、危険{きけん}な、つらい、悲惨{ひさん}な, etc.
It would mostly be a word with a negative meaning. I think it is safe to say that 「痛{いた}い」 would be the most common adjective.
The expression that I personally would suggest that J-learners learn would be 「いい目を見{み}る」, which means "to be fortunate/lucky". I say this because I almost never see a J-learner use that expression.