Is it legal to ask an intern to write a peer-review report?
The only ethical concern I see here is possibly one of deceit. If the supervisor or yourself misrepresented who the author of the review is.
But you didn't mention the destination of the review or where the original request came from.
But there are many situations in which such a thing would be perfectly fine. For example, a review used only internally. Or a situation in which the supervisor wanted the intern to learn enough to do a good job and get the experience of a review. This isn't especially rare in the case of advisors asking doctoral students to write reviews either as a form of practice or to provide a &quot;first draft&quot; of something.
But you can't expect that every reviewer on every paper is completely knowledgeable about what is in the paper. That would imply that science doesn't actually advance at all and that only &quot;known&quot; things appear in articles.
But, submitting your work under their own name would be a form of deceit. And, sadly, this happens in the case of doctoral students noted above.
Another form of deceit would be misrepresenting one's qualifications to do a review, though I don't see elements of that here. That would be an issue between the supervisor and the editor.