While we're talking about rank, it drove me nuts that in 7 years of Deep Space Nine, Bashir never got promoted to Lt. Cmdr. Nearly every other doctor we'd ever seen in Starfleet was at least a Lt. Cmdr (both Crusher and Pulaski were full Commanders), and he was supposed to be wicked smart.
Good observation! I'm betting the writers just never thought about it.
As far as Harry goes, I'm guessing the writers kind of worked themselves into a corner. They wanted to showcase a "green" officer, such as in "Lower Decks" from TNG. But since this person was part of the major cast, he needed to which be a part of the senior staff and in the middle of all the action to make the show work. It would be weird if they were constantly cutting to young Harry Kim stuck on Deck 5 with no clue what was happening. So you end up with an Ensign who's also a department head.