If either of the babies that you miscarried were Rh+, you would have been exposed and start producing anti-Rh during the miscarriage. Since they gave you RhoGAM then, you might not have the antibodies, but they played it safe by giving it to you. It wouldn't pose a problem if this baby is Rh-, but if baby is Rh+, the anti-Rh will attack baby when some of the blood mixes when you deliver. They give you the RhoGAM to combat that and as long as you get that, everything will be perfect :)
I'm also Rh- and I received the shot with both my pregnancies and after birth they check your baby to see if he or she's is positive and if they are you get another shot, if you have questions on it you can ask your doctor for something you can read on that's what I did with my first son and I got to understand alot more...
I have the exact same thing you do and i got my needle at 28 weeks then agan at 34 im 31 weeks today, i wouldnt stress hun about it because these needles are not for this baby its for a next pregnancy, google negative blood type during pregnancy, these needles are to protect your next pregnancy if you choose to have another baby :)
Its because im O-. I have a negative rH factor. My baby will have a postive blood type from his father so if it werent for the Rhogam shot my body would produce antibodies to fight off the baby like a virus or foriegn substance.
Is it because ur baby has the same blood type as urs? Ive never heard of that this is my third pregnancy and im type o positive