@EdwinAshworth raised a good point, asking where these sentences came from ("It's hard to comment on idiomaticity when the rest of a sentence sounds odd"). After reading that, and looking at your sentences again, they do start to look a bit odd.
They appear contrived. There are too many levels. I don't think you even need that many levels, if your purpose is to construct sentences that allow you to practice choosing between something and anything.
I will rewrite your sentences to make them more plausible, and indicate which is better (something/anything). If a different formulation would be better, I'll use that instead.
a) I wish Mary hadn't told you that John bought something in that shop.
I wish Mary had told you that John didn't buy anything in that shop.
b) I don't think anyone on the tour bus would have bought anything from that overpriced shop if the bus hadn't stopped for lunch at the bagel place next door.
c) I'm sorry you understood John to have invited some undergrads to your party. That was a misunderstanding. Actually, they were gate crashers. It's true that John knows them from his soccer league, but he didn't invite them and he didn't even tell them about your party. He's planning to ask them tomorrow how they found out about it.
d) I'm sorry to hear that you've heard the rumor that someone is going around slandering you.
e) The commissioner of education held a press conference to defend the presence of this book on the state's suggested reading list for 11th grade. In a prepared statement, she expressed profound regret that some school districts have banned it. She added, "It is a shame that in this day and age, any school would ban any book." But she emphasized that the book is not a required part of the curriculum. She said that teachers and principals are free to develop their own curriculum.