Exactly what the switch from Nozz-A-La to Pepsi is supposed to mean isn't entirely clear, but there is considerable evidence that the change is intended to serve as a meaningful hint, conveying a deeper significance, both internally (within the Kingdom Hospital story itself) and externally (in relation to The Dark Tower).
In some sense, the characters have traveled from an alternate reality1 to the real world, either physically/literally (by passing through some sort of gateway between the two realities) or by changing history in a significant way. The mechanics (i.e., exactly how they traveled between the two realities) aren't explained, but it probably doesn't matter much, because the result is the same: they were in an alternate reality, but managed to leave it and enter the real world.
The Great Old Ones must have preferred Nozz-A-La to either Coke or Pepsi, since some of the cans are still kicking around End-World. Nozz-A-La may also be found in many of the Alternative Americas.
- Stephen King's The Dark Tower: The Complete Concordance, written with King's assistance and oversight by Robin Furth.
Evidence that this is more than a mere Easter Egg:
It is easy to hypothesize about why a Dark Tower reference might be inserted into the show without any deeper meaning: perhaps the producers simply wanted to please fans of The Dark Tower, and although the Nozz-A-La/Pepsi switch indicates that something has changed, it doesn't have any significance with regards to The Dark Tower. The fact that the Nozz-A-La machine became a Pepsi machine only means that, as you suggested, the characters have slightly altered history.
This may be the simpler explanation, but I also think it is the less likely explanation. Stephen King is very proud of The Dark Tower, considers it his Magnum Opus and his most important work, and he doesn't take it lightly:
I have written enough novels and short stories to fill a solar system of the imagination, but Roland's story is my Jupiter - a planet that dwarfs all the others... a place of strange atmosphere, crazy landscape, and savage gravitational pull. Dwarfs the others, did I say? I think there's more to it than that, actually. I am coming to understand that Roland's world (or worlds) actually contains all the others of my making...
- Stephen King, “Afterword”; The Dark Tower, Volume IV, Wizard and Glass
Indeed, Kingdom Hospital is actually mentioned in the Dark Tower series, so the connection goes both ways.
Other Dark Tower references in Kingdom Hospital:
Peter arrives at the hospital in an ambulance bearing the number 19; 19 is a running theme in the The Dark Tower, which is used to convey the idea that things are a little screwy.
Hook enters the ICU using extension 99; 99 is a variant on 19 in The Dark Tower.
In addition to the Nozz-A-La machine in the hospital, Peter is discovered on the side of the road by the driver of a Nozz-A-La truck.
Peter is hit by a car while jogging; this is quite similar to the accident that nearly killed Stephen King in 1999 - he was hit by a van while walking near his home. The real-life accident that almost killed King is an important plot point in the Dark Tower series.
Kingdom Hospital is based on an earlier Danish series called The Kingdom, the plot of which included the birth of an evil demon-spawn; this plot element has a parallel in The Dark Tower, where Susannah Dean (possessed by a succubus, or evil spirit, called Mia) gives birth to a demonic monstrosity named Mordred. This parallel is reinforced by the appearance, in Kingdom Hospital, of a book written by "Mordred Wilder", and by a scene in which "Mia Dean" is paged to the Maternity Ward.
In private correspondence to Bev Vincent, the author of The Road to The Dark Tower, Stephen King described the Kingdom Hospital anteater guardian character Antubis as "Roland's old trailmate". This is incredibly compelling evidence of meaningful, deliberately drawn connections between Kingdom Hospital and The Dark Tower.
Conclusion: There is no room for doubt on this point - there are a number of connections between the two works, and although some may be trivial, others are quite significant and display a clear intent to create a meaningful relationship between The Dark Tower and Kingdom Hospital.
What the Nozz-A-La/Pepsi switch might mean (and why Nozz-A-La is analogous to Pepsi in Kingdom Hospital, whereas it is analogous to Coke in The Dark Tower):
- In The Dark Tower, Nozz-A-La is an analogue of Coca-Cola, and is found in "End-World" as well as in "Alternate Americas" (alternate realities)2. The flavor is described as being similar to Coke, with hints of root beer, and the logo is almost identical to the Coca-Cola logo; the words "Nozz-A-La" in white script over a red background:
However, in the real world, Coca-Cola has trademarks and copyrights on its logo and color scheme, and defends its property from infringement. As such, the Nozz-A-La machine and truck bear logos that look nothing like King's descriptions in The Dark Tower.
If we speculate a bit further, we might assume that the show deviates from the Nozz-A-La = Coca-Cola formula because either:
Coca-Cola wasn't interested in associating itself with King's Dark Tower-related works, perhaps because they don't like the parallels he draws between their brand and his fictional brand (and they might not be happy about the Great Old Ones' preference - shared by some of the main characters in The Dark Tower - for Nozz-A-La over Coke).
Or it may be a simple matter of money. If the producers approached Coke and Pepsi about a potential product placement agreement, they would probably make a deal with whichever company was willing to pay more. In other words, King decided that Nozz-A-La is analogous to Coke in The Dark Tower, but the network and producers of the show would surely be willing to deviate from that formula if Pepsi made it worth their while.
In any case, in The Dark Tower, the existence of Nozz-A-La is always indicative that the characters are either in End-World or an Alternate America (as opposed to the "Keystone World", which is the "real world", in which many of the most important action takes place in The Dark Tower, and in which you and I live). Thus, when Nozz-A-La exists in Kingdom Hospital, the characters are in an alternate reality, and when it is replaced by Pepsi, they have somehow entered the real (Keystone) world. In The Dark Tower, characters travel between the various worlds via magical portals (usually in the form of unassuming-looking doorways); however, it is entirely possible that altering history would have the same effect as passing through such a portal.
Conclusion: As the Complete Concordance says, Nozz-A-La is found in The Dark Tower's End-World and in many of The Dark Tower's Alternative Americas; at face value, this would seem to indicate that whenever we see anything about Nozz-A-La in Kingdom Hospital, the characters are in one of those Alternative Americas2. The fact that Nozz-A-La is analogous to Pepsi (rather than Coke) is probably best understood as a reflection of real-world (i.e., out-of-universe) considerations, and the most likely explanation is that Pepsi was probably willing to pay more for product placement than Coke was.
Although the mechanics and details are somewhat unclear, we can be reasonably confident that the existence of Nozz-A-La in Kingdom Hospital indicates that the characters are in some sort of alternate reality, just as it does in The Dark Tower. When the Nozz-A-La machine becomes a Pepsi machine, the characters have left that alternate reality and entered the real world; this may have happened because they went through a portal, or it may have happened because they altered history in a significant way.
1 I have opted to use the term "alternate reality" for the sake of consistency and convenience, but the term "alternate timeline" might be equally (or even more) accurate. Whichever term you prefer, the idea is the same: Nozz-A-La existed in a world/reality/timeline that isn't quite real; Pepsi exists in a world/reality/timeline that is essentially the same as the one in which we live.
2 If you haven't read The Dark Tower, you might be thinking, "But you just said Nozz-A-La exists in many Alternative Americas and in End-World! Doesn't that mean the people in Kingdom Hospital might be in an Alternative America, or in the End World?" In short, no, they are definitely not in End-World. End-World is part of a sort of post-apocalyptic place very different from our world; it is a bizarre blend of various elements that, compared to our own time, vary between the futuristic and the historic. Advanced robots and sentient bullet trains exist alongside Old-West frontier towns; the (anti)hero of the series, Roland Deschain, is the last representative of a Jedi-like knightly order of "Gunslingers", and wields revolvers forged from the steel of the legendary sword Excalibur (and in fact, Roland is a descendant of King Arthur).
End-World is one of the three realms of what is loosely called Mid-World (Mid-World, rather confusingly, is composed of In-World, Mid-World, and End-World). It is the location of the titular Dark Tower, which is the hub of all existence and every world. Basically, there's no way you could be in End-World and not realize it - it is so unique and bizarre that it would be impossible to mistake End-World for anything resembling our own world.
This being the case, the events of Kingdom Hospital may take place in the real world, or one (or more) of The Dark Tower's Alternative Americas, or an alternate world unrelated to The Dark Tower, or some combination of some or all of the above; but they certainly don't take place in End-World.