Madrid's public prosecutor's office said the two women are suspected of manslaughter and denial of medical attention in relation to the death in March of a woman in her 80s who had just moved into the home.
Madrid was one of the hardest-hit cities in Europe by the first wave of the pandemic, and the complaint is expected to be one of several alleging inadequate care at retirement homes during the period.
In a statement, the prosecutor's office said the doctor and the director of the home, who were not named, did not follow the protocol set up by the Madrid regional government for caring for residents during the pandemic.
The doctor “disregarded” the protocol and did not call a hospital about the woman, despite her worsening condition, until eight days after she began having breathing trouble.
“Despite her rapid transfer to hospital, she died the following day from cardiac arrest,” the statement said.
The care home's director “was aware of the patient's clinical situation (but) did nothing” to ensure she received health care during periods when the doctor was absent, notably on the weekend before her death, it added.
Amnesty International warned earlier this month that conditions at elderly care homes in the Madrid region and in Catalonia remained “alarming” despite improvements.
In a sharply worded report, it said the “vast majority” of residents had not been properly cared for during the pandemic.
The measures put in place by both regions were “inefficient and inadequate” and violated the residents' rights, it said.
Spain has been one of Europe's worst-hit countries, with the virus infecting more than 1.7 million people and causing over 48,000 deaths.
Close to half of that number are believed to be elderly people who died in homes, Amnesty said.
At the height of the first wave in March, Spanish soldiers helping to fight the pandemic found elderly patients in retirement homes abandoned and, in some cases, dead in their beds.