If you don't share the task description or other materials provided by your university, I don't see the problem with sharing your essay. (Not a lawyer)
on the contrary i thought any essay, paper or report written for uni or school can be considered for publication in some form. not everything is worth publishing of course, but if it is, talk to your supervisors about it.