When I was born, my mother was 21 and my father 24. I was an "accident", but they decided to have me and during my whole life, I have had everything I might have needed. My dad got a job and my mom dropped out of college to look after me, three years later my little brother was born. My mother eventually got into college again as my brother and I grew up (when we were teenagers), now she graduated with top marks. She and my dad are still together, we have a beautiful house and my dad went from being a simple employee to being a boss in one of the biggest sections of the company he works for. I am now 22 and in one of the best universities of my country and I feel life has been really good with me.
Still, I know that my parents weren't at the right age to have kids. Both my brother and myself feel like they weren't able to support us emotionally during our childhood and teenage years. Which now makes us kind of insecure and generally, not entirely emotionally healthy. Now my parents are a LOT more mature than the way I remember them from when I was a kid, and I'm sure that if I had been born when they were in their thirties, it would've all been different from that point of view. I myself know that right now, I am in no place to have or raise a child.
Anyway... I am very happy that my parents chose to have me..! But they were in love and were going to get married anyway. In this case, I think the OP did the right thing. The child wouldn't have had a loving family, nor the economical support.