I think you're referring to ambiguity. Look at these:
-He is an English history teacher = he teaches English history, and he may not be English.
-He is an English history teacher = he teaches history and he is English.
About your case, I would say it means 'an essay written in English', because we can use other structures to convey 'an essay about English'. For example, as you have mentioned, we simply could say 'An essay onthe English language'.