"Waking Moments" premiered on January 14th, 1998. That's when Kim had the dream about Seven, IIRC. "Hunters", the first episode after "Message In a Bottle", when they were waiting for letters from home, premiered on February 11th, 1998. Until he finds out that Libby has moved on, he's still technically engaged to Libby and wouldn't want to betray that.
Also, even if he's attracted to Seven, he doesn't know what to do about it. Nightmares are a manifestation of people's inner thoughts.
@fireproof78 can correct me if I'm wrong, since I'm not a Psychology Major, but that's generally been true in my own experience. So he's trapped in a situation he's thinking about can't do anything about and is embarrassed to admit when Torres and Paris ask him about it.
I think the first thing anyone would think of is, "How did I end up in this drastically different situation?!" If my situation suddenly changes without explanation, I'd like to know the explanation.
The rest, as has been said, is sloppy writing. But, to cover for it, it's possible that Libby was the one driving that relationship and Kim's parents thought Libby would be perfect for Harry, so encouraged him to get engaged. And he was in his early-20s. He -- and his parents might've -- seen it is another item in the checklist. Career? Check. Getting Married? Check. Have 2.3 kids? Next. He was doing everything he thought he was "supposed" to do, not necessarily what he wanted. He seems like that kind of person. He just does whatever he thinks he's supposed to do, to make everyone else happy.
That's
Voyager Season 5 territory. That's after Jeri Taylor left the show, Brannon Braga became showrunner, and when I started turning on B&B. At this point, the characters served the plot, not the other way around. Sometimes it turned out good, other times it turned out bad, and this episode turned out
extremely bad. In "The Disease", Kim is written to be the teenager. Teenagers are in love all the time but don't want to live with each other. That's all I'm going to say about "The Disease". It's a shitty episode with no redeeming value and shouldn't be used in an argument for anything.