Who built "houses" for Shifrah and Pu'ah, and what sort of houses were they?
Rashi and Targum Yonasan: Hashem established dynasties from them; see 1:21:1:4.
Da'as Zekenim and Rashbam: It was actually Pharaoh who, when he saw that they feared Hashem, built them houses and kept them under guard, to prevent them from visiting the Jewish mothers who were about to give birth. 1
Hadar Zekenim and Riva: Pharaoh built houses for the Egyptians between the houses of Yisrael, 2 so that they would know when a Jewish baby boy was born 3 (and be able to kill him).
Sotah 11b: Rav and Shmuel argue over this point, whether Hashem made for them Batei Kehunah and Batei Leviyah (Aharon and Moshe) or Batei Malchus - since David ha'Melech descended from Miriam. 4
See next Pasuk (1:22). Hadar Zekenim, Riva - But if it refers to the midwives, it should have said "Lahen" (in the feminine)!
Hadar Zekenim supports this from the Pasuk (in Parshas Bo), "u'Fasachti Aleichem" (12:13) - I will skip over the houses of Yisrael between the houses of Mitzrim.
Sotah 12a: An Egyptian baby would cry, and when the Yisrael babies heard him, they would cry as well. (Also see Rashi to Shir ha'Shirim 2:15 -CS)
See Torah Temimah, note 30.
QUESTIONS ON RASHI
Rashi writes: "Batim - The dynasties of Kohen, Levi, and the monarchy are called 'houses.'" Why?
Gur Aryeh #1: Just as a house includes its various contents, so too do these families include all the individuals who are eligible for these positions. Likewise, a kingdom includes the nation over which the king rules.
Gur Aryeh #2: Just as a house stands as a permanent structure, so too are these families. The monarchy 'stands' in the sense that if the king has a son fit to rule, he precedes all others.
Rashi writes: "He made for them the dynasties of Kohen, Levi, and the monarchy." Why was this their fitting reward?
Maharal (Gevuros Hashem Ch. 15, p. 74): It was through their deeds that 'the House of Yisrael' was built up; so they too merited permanent dynasties.
Rashi writes: "He made for them the dynasties of Kohen, Levi, and the monarchy." These are the combined suggestions of two opinions in the Gemara (Sotah 11b). Why does one of these opinions not count the monarchy?
Maharal (Gevuros Hashem Ch. 15, p. 74): The monarchy is not permanent in the same sense as the families of Kohanim and Leviyim (in that during Galus, we do not have a king from Beis David). 1 Perhaps then, the monarchy was not part of Hashem's promise to them.
But Yaakov did in fact bless Yehudah never to lose the scepter of royalty (Bereishis 49:10)! Refer to Bereishis 49:10:1; Bereishis 49:10:1.2:1; Bereishis 49:10:1.3. (CS)