彼はもう宿題をやってしまった。

English Translation

He has already finished his homework.

Doesn’t しまった imply something bad, or is there a different context/ meaning here?

@TisYanni
As you guessed, しまった can be interpreted as a bad/inconvenient situation. 彼はもう宿題をやってしまった can be followed by “so, he has nothing else to do to kill his time at this moment.”

Another connotation of しまった is a present perfect tense (“have already done and what’s done is done.”)

To avoid the ambiguity, we usually say

彼はもう宿題をやり終えた。(しゅくだいをやりおえた)
彼はもう宿題を済ませている。(しゅくだいをすませている)

instead of 宿題をやってしまった.

A typical mom always ask her kid by saying 宿題終わったの or 宿題済ませたの? These are common phrases.