They were not written at all. No written literature existed in the time of Homer.
If I write a song for my girl, I'm not going to hand her a piece of paper with sheet music and lyrics, I'm going to perform it for her. I may write it down, or I may not.
Of course, composed is a more precise word, but everyone still knows what I mean if I replace it with write.
Writing is an action. You can memorize, take a mental note, but you are not writing.
(Someone else mentioned Camōes, a portuguese who famously/allegedly saved his writings from a shipwreck by swimming with one arm and using the other to keep the book above water; your interpretation of "writing" is an insult)
This is generalising the term writing to the point of uselessness. In your example, you thought of a poem and spoke it. You didn't write it.
I'm really not sure how anything else could be interpreted? I think this was actually very much to people's frustration even, as Homer was often misunderstood in their eyes, e.g. Plato often expresses this sentiment.
Though bluntly we've always had nationalistic narratives contaminating what's "approved" in school, both with literature and history. Stephen King could be anything from mandatory to forbidden for any reason at the same time in different places, even on that kind of timescale. The USA may cease to exist as a singular coherent entity, and it may be two or more successor states in parallel who have a culture war with each other over if Stephen King was real or not.