Does it make any sense to edit a question which I have flagged and will probably be closed?7
An example would be to add the [homework] tag to a bad homework question.
In your example, always add the homework. In fact, I would say always edit the tags on good and bad questions if appropriate. After all, you may flag it but it might not get closed for awhile.
I call my approach to bad homework specifically the DEF method -- Downvote, Edit, Flag.
It can still be useful for people who come across the question later and may look to it as an example of how to ask their own questions. So I wouldn't call it a bad idea. But it's not as important to edit a question which is going to be closed as it is to edit those which are going to stay open.