possible explantions:
1. The "meta" explantaion. Obviously the writers had not yet written Generations yet so they didn't "know" that Kirk was dead.
The real-world situation is not an explanation, but rather the cause for the seeming in-universe discontinuity. You are correct that it is obvious, which is why I didn't mention it the first time. I thought everyone here is already aware that "Relics" aired a few years before the release of
Generations but takes place afterwards. (So it is the movie that seemingly violated continuity. And the
Generations writers said they were aware of the dialogue in "Relics", but included Scotty anyway for "love of the character". What Nimoy revealed is that he and De Kelley were asked to appear in
Generations, and they declined. So they gave Spock's part to Scotty and McCoy's part to Checkov.)
2. The "techno-babble" explanation. Geordi says that Scotty's pattern had only degraded by some fraction of a percent. It's possible that that fraction of a percent was the "memory" of Kirk dying. It's unlikely and an extreme coincidence, but it's "possible" in the techo-babble sense.
I see that others have thought along the same lines as you and I. Scotty clearly remembers the events leading up to his beaming himself and the crewman in the transporter so there weren't any overall memory issues. I lump the confusion/disorientation explanation in with this one because they are all temporary. With all these solutions I assume that Scotty eventually remembered Kirk's apparent death in 2293.
3. The "colloquialism" explanation. Scotty could've been speaking in a figurative manner, saying that his chances of being recovered were so extreme and unlikely that it'd take Kirk coming back alive, reocvering the Enterprise and hunting him down for Scotty to be discovered and recovered.
Thank you for offering another possible solution, but that one doesn't work for me. It may work for others though.
It seems to me that everyone is dancing around the elephant in the room, or to put it another way the simplist answers is the correct one. Kirk is alive. Or will be, it just has not happened for us yet.
Ah, no, we are not dancing around that.
We all know that here, but the characters in the story don't necessarily know that. Again we are talking about what the characters know, not what we know. Scotty presumably wouldn't think that Kirk had survived in the Nexus. I imagine that most people would discount the experiences of those who had contact with the Nexus as mere hallucinations, citing that there is no evidence that the Nexux contained any sort of reality within it.
However, as another possible explanation, it is not entirely unreasonable that Scotty may have actually believed Kirk had somehow survived his apparent demise, especially if Scotty had talked to any of the survivors that experienced the Nexus before being ripped away from it (like Guinan and Soren) before leaving for the Norpin colony. Maybe in his denial of accepting Kirk's death, Scotty chose to believe that Kirk survived in the Nexus, and perhaps even that he might return some day. Of course, when he was rescued by the Enterprise-D, he would be told that there has been no known return of Kirk, much to his disappointment. And I imagine that after Scotty later heard that Picard had rescued Kirk from the Nexus to sacrifice his life to save millions, Scotty might have finally come to accept Kirk's death (considering there was a body this time).