What we know about opposition to caste systems is this specific phrase by Sisko:
"You realize that caste-based discrimination goes against the Federation Charter. If Bajor returns to the D'jarra system, I have no doubt that its petition to join the Federation will be rejected."
Sure, Bajor's system or the discrimination practiced within it might be of a particularly damning type. But Sisko makes it appear more generic than that, that is, all discrimination that is based on caste is frowned upon in the UFP. Caste systems that don't
discriminate may be fine, though.
I think in this context, the difference between a caste system and a class system is that Bajor's D'jarra system was based solely on what your family name was. Family name is Kira? Congratulations, you're an artisan. Can't sculpt worth shit? Not my problem.
A Class system would imply that you are capable of moving up and down between the classes based on your level education or earned wealth, and that movement between classes is not restricted. Can't sculpt worth shit? Better find something else to do, because you're not making it in this society as an artist.