Inheritance laws in Islam are a mess. By which I don't mean they are horrible, not really, but they are really difficult to navigate. (You should have seen the nightmare when I was trying to figure out my first husband's estate. Dear lord!) Paternity for the sake of inheritance or maintenance can not under any conditions be established by way of adultery itself. Period. I have never read of an alim even hinting otherwise. Marriage carries with it a presumption of paternity which can only be broken by the denial of both marriage partners. The recognition of an acknowledgment of paternity outside of presumptive paternity is, however, a part of Islamic law. Now, obviously that can conflict with the fact that adultery can not establish paternity. One manner of reconciling that is to accept the acknowledgment of paternity while continuing to encourage people to remain silent on the sin itself; to not equate acknowledgment of paternity to acknowledgment of adultery. So it is possible for an illegitimate child to be effectively legitimized in the eyes of the law as it exists, little though it happens in practice. The only time consistently named among the ulama that an acknowledgment of paternity absolutely can not apply is when the mother and father under no conditions even could have been married -- such as if the mother was married to someone else at the time, in which case the presumptive paternity and associated rights would apply. (I have never seen proof of marriage in the case of acknowledgments -- the bringing forth of witnesses, for example -- to be mentioned, though I suppose it's possible that some scholars have preferred. I'm guessing, even if preferred, 'urfi marriages, complicated misyar marriage, migrations, and volatile times have made it sometimes seem unrealistic. To demand proof could be tantamount to denying sworn testimony and setting up cause for false accusations.)
That option, of course, carries with it its own problems. What if a rightful father denies? But then, what if a mother is dishonest in attributing a child to one man over another? The classical law had to find a way to balance that. And what it came up with was that (a) marriage legitimizes and takes two denials to negate the legitimacy, and (b) a lack of marriage delegitimizes and takes two affirmations to legitimize. (Personally I think a reasonable correlation could be drawn between affirmation and paternity testing ... I say "could be" because to my knowledge it has not been in the interest of prioritizing other issues surrounding making accusations. But I still personally think that the case could be made by working with the law.)
As to that presumption of paternity, maximum legal gestation is longer than maximum actual gestation. So a child conceived prior to marriage should the marriage occur within the extended period, which encompasses about the first full trimester, would have that presumption. That possibility -- that of marriage upon the discovery of pregnancy -- would be the topmost option the law encourages.
What it comes down to is that a mother's word alone is not enough to make a legal claim of paternity for the purposes of monetary benefit. There has to be something else. Lacking marriage, lacking acknowledgments, and lacking any legal acknowledgment of more technological options than when the law was conceived -- lacking a legally established paternity -- the child simply obtains the rights of maintenance and inheritance more in line with those of orphans and adopted children. (I don't think Islam is really complicit in any shunning of orphans or adoptees either, myself, though I suppose some may disagree there too.) At no point does it say "because you are worth less due to your heritage;" it simply says "what is affirmed can be acted on and what is not can not" -- paternity in law is a legal term, not a moral one. Should a father knowingly refuse to care for his own child, in the end that's upon him. And if a people choose to practice beliefs contrary to the basic Qur'anic principle of not punishing one for the sins of another by turning the legal designation into a socially detrimental moral one ... you know, may god help them, but contrary is still contrary.
--------------------------
On a more personal side, I'm really very sorry that you're feeling like the state of our community speaks ill of our faith itself. It's happened to all communities, all faiths, all ideologies, and it's a shame. I sincerely hope trying to reconcile what is in the world with regard to woefully unrealized ideals does not result in a more nihilistic view towards those ideals themselves. Many have merit ... they just need people to listen and apply. A message, a system, even a law, is not a bludgeon ... in a world of choices even perfect truths are not guaranteed realization. And claiming belief in something does not mean acting upon or even understanding it. That doesn't really say much about anything other than the fact that the Qur'an is right in suggesting that religion lacks compulsion. That can apply further than simply in reference to forcing non-believers to believe.