Child Abandonment- advice

I'm posting anon because this may be a dumb question but I'm seriously worried.

Does child abandonment tun in families? I'm asking because the last 4 generations in my family have been raised by their grandparents. Not one was raised by their parents. With me, my mom shoved us off on many people throughout the years then she'd come back then leave again. She would pick and choose when she felt like having kids. I have a baby on the way and I swear I'm willing to raise this child until they're 99 if I have to. However I'm wondering if child abandonment or poor parenting is subconsciously passed on? All the 'mothers' in my famiky swore they wanted kids but when they came, they ran away and I'm deathly afraid I may do the same. Am I just being crazy or is this fear legitimate? I feel like I need someone to slap some sense into me honestly.