I really don't mind how anyone decides to interpret "Books like onions". But given that it was inspired by Shrek saying that ogres are like onions, because they have layers, the idea was to put forward novels that (appear to) have layers: things going on at multiple levels.
One fairly obvious example (don't worry Catlady, I'm not considering nominating these) are many of the books by John Irving. He made something of a habit of telling stories within stories within stories. Or there are many allegorical books, some intentionally so (a recent book talked about
Leaves of Grass and the poem
Song of Myself by Walt Whitman), while some have had allegory thrust upon them (thinking
Lord of the Rings here).
And if anyone is worried that their preferred option doesn't fit, consider that I think
Twilight by Stephenie Meyer could be said to be unintentionally multi-layered. There is the what the author intended (presumably) and what YA audience see (again presumably), and then there is an extensive subtext such as revealed by this impressive
deconstruction by Ana Mardoll.