“Don’t upset yourself,” Fred tells his pregnant wife, Rose, in “Shirley.” It’s one of many condescending reassurances in an unsettling drama where, in fact, Rose has plenty to be upset about.

Fred (Logan Lerman), a young academic, and Rose (Odessa Young), who has put her career on hold, are taking supposedly temporary shelter with Stanley (Michael Stuhlbarg, from “Call Me by Your Name” and “A Serious Man”). Stanley is Fred’s new boss at Bennington College in Vermont in the 1950s.

It quickly becomes apparent that Stanley expects Rose to be an unpaid cook/housekeeper/companion to his wife Shirley (Elisabeth Moss), who, when she’s not throwing plates, is confined to her bed, hurling insults at everyone in the house. Faster than you can say “Who’s Afraid of Virginia Woolf?,” the young couple is trapped in a sick battle with their older hosts.

The specter of playwright Edward Albee’s masterpiece hangs over “Shirley,” which uses that association to its advantage. Josephine Decker’s movie is a decidedly feminist spin on the toxic stew of “Woolf.” The two men do what you’d expect in the 1950s — bray at faculty parties, dally with coeds, slam each other’s work — but the movie is more interested in the women, whose bond shifts from suspicion and hatred to something resembling a friendship. You could think of “Shirley” as a version of “Woolf” in which we care about the pain that made the older woman so vicious, and about the path leading the younger woman to the same place.

We never learn what Rose might have to offer if she weren’t so busy cooking roasts, but another fascinating aspect of “Shirley” is that the title character is Shirley Jackson, the genius whose work includes the classic story “The Lottery” and the oft-adapted novel “The Haunting of Hill House.” Although she lived only 48 years, Jackson was remarkably productive, even if only half of this highly fictionalized movie is true (for one thing, Jackson had four kids but has zero here). Although he seems to support her work, the movie’s Stanley diminishes it, too, using an improvised marital version of Munchausen syndrome to convince Shirley she’s too delicate to get out of bed, much less put pen to paper. The subtext here is that Stanley is so intimidated by his wife’s talent that he labors to keep it idle.

Their twisted dynamic is thrilling, all the more so because Moss’ performance as Shirley is so ferocious. In “Mad Men,” “The Handmaid’s Tale” and even this spring’s fantastic adaptation of “The Invisible Man,” Moss plays naive women who step into terrible situations not of their own making. Shirley Jackson is very different. She’s undoubtedly coping with mental illness that would have gone untreated in the ’50s, but Moss’ instinct is to veer away from victimhood and toward the strength that kept Jackson alive. It comes out as withering quips at cocktail parties, nasty practical jokes, occasional compassion for the road she sees Rose about to take, and a perverse hint that Shirley might create all the drama in the house because it fuels her creativity.

Long story short: It’s no surprise that Jackson’s stories and novels dealt with the horrors that exist around us that we choose not to confront. The “Shirley” scenes that are set outside of the house feel phony, maybe because the atmosphere Decker creates inside is so dank and claustrophobic. And the two husbands are so one-dimensional that it seems Decker is uninterested in them.

On the other hand, maybe that’s the point? Shirley and Rose are so done with their husbands that all they need from them is to get out of their way.