One minor quibble about a fact: some Ferengi are religious. It’s not just the Bajorans. Now, onto the heart of the matter…
It’s true that Gene Roddenberry was a secular humanist and did not believe religion would survive into the 23rd century. It’s his utopia, so he got to decide if there’s religion or not. That said, religious and cultural trappings did survive.
Scotty plays Amazing Grace on his bagpipes (I find it HIGHLY suspect that bagpipes would survive into the 23rd Century). This is a Christian hymn. You may argue that a Christian hymn can largely be interpreted as a cultural artifact as much as a religious one, or that even Picard’s celebration of Christmas in the Nexus was merely cultural, not spiritual, but the same could be said for a woman choosing to wear a hijab.
I realize this sounds bizarre, but it is possible to be an atheist and either be in a religion or identify culturally with religious trappings or iconography. There is a such thing as a Christian agnostic. There is a such thing as a Muslim agnostic. I, myself, am an Satanic atheist. In light of how these things exist, and perhaps even represent an evolution of religion out of its roots in mysticism, it makes perfect sense to me that a hijab could be present in a secular vision of the 23rd century.