In many upper class Egyptian homes, French was spoken within the family,
just as it had once been among the Russian aristocracy.Option Elimination -
(A) just as it had once been among the Russian aristocracy - ok. In essence, it says that French was spoken in both upper-class Egyptian homes and Russian Aristocracy.
(B) just like it once had been among the Russian aristocracy - after "like," we need a "noun" or a "noun phrase." But here we have a full clause after like. Wrong.
(C) just as the Russian aristocracy had once done - ok. Let's expand it to "just as the Russian aristocracy had once spoken." Okay, so spoken what? French? Russian? English? Spanish? Hindi? What? That is why option A uses "it" to refer back to "French" to avoid confusion. I'm afraid that's not right. Moreover, as MartyTargetTestPrep has pointed out, having the same voice on either side of "just as" is preferable to maintaining parallelism. E.g.,
Preferred: "Just as she sings, he dances."
Less preferred: "Just as she sings, dancing is done by him."
(D) similar to what the Russian aristocracy had done once - the same issue as in C. Spoken once what? French? Russian? English? Spanish? Hindi? What? That is why option A uses "it" to refer back to "French" to avoid confusion. Wrong. Moreover, a preferred construction after a preposition is a noun, noun phrase, or gerund and not a noun clause, as in this case, "what the Russian aristocracy had done once."
(E) like what had once been done by the Russian aristocracy - "like," whether used as a comparison or preposition, needs to be followed by a noun or a noun phrase. Noun clause after "like" is not preferred. Moreover, the same issue of Russian aristocracy spoke what?