If "we" happened to be all women, could this also be: हम एक कविता लिखती हैं।?
Yes. It should be accepted because we don't know who "we" are. We could easily be all female.
In common or general the helping verb would come as रहे. It can also come when the gender of the subject is not informed.
Correct, though लिखते हैं is not incorrect either, and mostly considered gender-neutral today.
This wasn't accepted but I think that it should have been.
It doesn't mark it wrong (in red) but does say "you have a typo".
Just a little correction, you would have to write हम सब एक कविता लिख रही हैं. Here the word लिख is a masculine noun and would remain as it is not depending on the gender of the subject. The helping verb would modify as रही .
Is the "ek" compulsory?
No, not at all.