Once you realize that the book is actually Clark's story, with Podkayne only being the narrator, her dying is the only option.
Also Heinlein had a tendency to make his “juvenile” novels kind of hard on the reader, because he didn’t think kids should be fed a sugar-coated version of real life.
The last two words of the story, “maybe everyone,” also kind of imply that she’s not with us anymore.
If the ending of that story hadn’t been so sad, I don’t think I would have remembered it more than forty years. In fact, I think the reason I do remember it is because I read the last five or six pages over and over again, trying to figure out of Podkayne survived or not.
Heinlein had a knack for creating very lovable female characters.