I don't know what might happen if a child is given a dose of Prilosec that's gone "bad"; however, a quick call to a local pharmacy would answer that question pretty quickly.
Any time a medication changes color or develops an odd odor, even if it hasn't reached it's expiration date, it's suspect and I think you made the right call. Even our unflavored Prilosec never smelled "bad"--it smelled like baking soda (sort of like, um, nothing *LOL*) and the flavored batches always smelled like grape and baking soda. Nothing unpleasant. We never kept it more than 30 days in the beginning, then we started having it compounded in 14-day batches.
If you feel the medication was past it's date and that the charge nurse acted in bad faith, you might consider reporting this to the hospital/state board of health. This sort of thing is very serious and, in some cases, might prove to be extremely harmful.