Allah says in the Quran that no one will bear the burden of another. We are all responsible for our deeds.
It is not healthy to go through life with a sense of pre-destination that one will go to hell, because that can easily become a self-fulfilling prophecy.
Sometimes some people are irresponsible when they talk about illegitimate children and either say things without thinking, or else they don't critically examine the texts they are talking about and quote them without thinking or comparing or examining them closely. It perhaps doesn't occur to them that some of the people sitting there listening are not of legitimate birth. There should be more responsibility in discussing these things so that people do not go around worrying they will go to hell because of what their forebears did.