If I were to do this I'd probably leave a couple of sections uncovered & use them as actual shelves.
Put the insulation board in, then a piece of thin ply to cover it & act as the back of the bookshelf.
Frame it out on all four sides with 1x12's (or 1x10s) & have one or two more shelves.
Kinda like these upper units, but recessed into the wall:
Could get quite creative with various size vertical & horizontal pieces.