A response to this question.
What short stories, poems or other works of the literary art reflect (directly or indirectly) an author's experience as a writer? What messages do these pieces convey? How should/can these works affect my own writing?
Art is obsession, and how well (or badly) it's dealt with seems to fascinate artists.
Ernest Hemingway was the focus of Dan Simmons's The Crook Factory, a faux-historical novel set mostly in Cuba; and also Joe Haldeman's The Hemingway Hoax, where the eponymous hoax is interrupted by the ghost of Hemingway itself (maybe, the story isn't all that clear on that). The former book is more about the writer and his effect on the protagonist, an FBI agent, the latter about his writings and he process of writing (even though it's the process of forging prose that will fool experts). Both books are concerned with the effect of Hemingway's strong personality on the viewpoint characters. He was a colorful figure, and I wouldn't be surprised ol' Ernest is a character in many more books.
Three installments of Neil Gaiman's Sandman graphic novel concern William Shakespeare and the act of writing: more specifically, Men of Good Fortune, A Midsummer Night's Dream and The Tempest are three issues that concern The Bard and his deal with Morpheus. This mini-arc echoes throughout the rest of the 75-installment tale and concerns preserving great stories, and the sort of immortality an artist can achieve. My favorite line from the entire work is "The price of getting what you want, is getting what you once wanted." (Typed from memory.)
I'll round this out with a fictional example: Kilgore Trout is perhaps the most well-known hack writer in American literature. Kurt Vonnegut's creation was actually based on Theodore Sturgeon, and the character's most significant appearance is in Breakfast of Champions, where he finds out that he is the creation of another writer, and he meets his maker near the end of the novel. Trout writes what seems would be terrible stories, and has published dozens of them in his life. However, he has his fans, who seek out their idol's work in porn shops and bargain bins. This endlessly fascinating character has written books he's never even seen a copy of, but are published somewhere. The message seems to be that life is a pointless farce, and there is no message except for what we may read into it. Life may be dreary, but let's laugh at it anyway!
I also find that, while I'm reading any story with Kilgore Trout in it, I find myself more conscious that this is a book written by a writer, and that these are words on a page. I somehow still care about the characters, especially the "minor", insignificant bit-parts.
Sooner or later, I think most artists will create a work that's meta to at least some degree. Pete Townshend wrote Psychoderelict, the story of an aging, artistically failing hippie rocker in the modern world; Pink in The Wall nearly dies of a drug overdose before playing a concert; Federico Fellini made the wonderfully confusing 8 1/2, a film about a director creating a film that cannibalizes his own life; and (my favorite), [Title of Show], A broadway musical about two guys writing a musical about writing a musical.
In general, the theme of mining life for artistic inspiration comes up often. In Gaiman's The Tempest, Shakespeare notes that when his son died, he mourned, but was also glad: Now he could write of true tragedy and make the pit weep true tears. In The Crook Factory, Simmons notes that everything in Hemingway's life was secondary to Hemingway. Kilgore Trout is the only writer on this page who did not let his art consume his life, and he's fictional. Similar themes are veined throughout the three non-literary works I mentioned above, and are resolved with varying degrees of healthy outcomes.
Stranger Than Fiction is a movie that comes to mind.
What messages do these pieces convey?
The message of The Shining is that if you try to write a story you won't write a story. Instead, you'll go mad and attack your family with an axe.
How should/can these works affect my own writing?
The Shining should affect your own writing by inspiring you to distill all of your thoughts, ideas, emotional insights, and observations into a single sentence.
Eudora Welty's One Wrtier's Beginnings weaves together in an absolutely lovely way the story of her journey as a writer. Along the way she shows how her own sensibilities as a writer were shaped. This book helped me think about my own journey as a writer and also is helpful in directing future journeys.
Anne Lamott's Bird by Bird is ostensibly a non-fiction work on writing, but contains many autobiographical elements. The autobiographical elements not only keep the work engaging and the reader interested, but also help to make the instruction in the book concrete.
Two short stories that seem (to me) to be obvious metaphores for the author's relationship with writing:
Albert Camus', "Jonas or the Artist at Work"
[Spiolers to follow]
Both stories depict artists who were at one time famous and respected but overtime become forgotten and frail.
Camus' story is about an artist who completely dedicates himself to coming up with the most perfect piece of art and after weeks of ceaseless labor produces an almost completely empty canvass.
Kafka's story describes a "starving artist" whose talent is so innate that it pretty much enslaves him.
Saul Bellow's Herzog seems to me to be about the identity of a writer: a troubled middle-aged man in the Midwest (of America) who writes letters to people he knows, but also to dead authors and thinkers. His life as reflected in the book is largely lived out in conversation with literary greats through letters he never sends.
Just read 'Wicked', by Gregory Maguire, which was about imagination and used the Oz books by L. Frank Baum as a jumping off point. Also, 'A Very Long Engagement', which was a novel, set in the Great War (who knew it'd go into sequels?) that was very self-reflective about writing.