A theory of mine is that in the earliest planning stages, Commander was meant to be Sisko's title rather than rank. In much the same way the commanding officer of a naval officer as addressed as "Captain" regardless their actual rank, a person in charge of a space station is addressed as "Commander" regardless of their actual rank or professional title. For a real world example, when Chris Hadfield was in charge of the ISS he was addressed as "Commander Hadfield" even though his actual rank in the Canadian military was Colonel. With that in mind, I suspect during the early stages everyone said "Commander Sisko" thinking it would be his title and not necessarily his rank. Then as the series developed, everyone just got so used to calling him Commander Sisko that eventually Commander ended up becoming his rank.
Just a theory of mine which may not be true at all, but it shows that Sisko's lower rank was a result of ignorance and miscommunication rather than malicious intent or anything. So I prefer to believe it.
Yes, Commander has been a job title for NASA astronauts in the Apollo missions, Skylab, Space Shuttle, and ISS stations. But NASA doesn't have ranks within the astronaut corps, though most of them have their ranks in one of the armed services.
Maybe the show writers were just setting it up so they could promote him in a few years. And/or to stress how unimportant Bajor was at the beginning of the show.