There's truly no guarantees in life.
I've seen countless posts from care workers and discussions from care workers about this kind of topic. One spoke of an elderly woman whose room at the care home was surrounded by pictures of her adult children and her grandchildren. She never received any visits whatsoever. I remember thinking how awful that was-of course, her adult children could live abroad or far away, but still, it felt awful.
However, the message was consistent. Having children wasn't a guarantee that in your later years, you'd have company. In fact, I've heard some say that some of the most popular residents at care homes were the child-free because they'd taken the time to build up their community and haven't relied on familial bonds to obligate someone to be there.
Honestly, OP, people who make those kinds of snide remarks and I've had them too, aren't worth keeping in your life. I, too, like @MrsDanversGlidesAgain think they're just jealous and bitter and are lashing out at you.
Some people will try and use the fear of dying alone or being old and alone to try and ply you into making the same choice they made or to feel better about their own choices. They, themselves, may be waist-deep in shit but thinking, "Oh, but at least when I'm old I'm guaranteed care-givers in my then adult children!" 🙄
If I were a parent, I wouldn't want my adult children taking care of me or feeling obligated to be burdened with me. I'd like a visit now and then, but if I'd done my job right, they're living their best lives somewhere else.