Concur that the set-up shown should work.
For a given number of bookshelves, the enchantment level offered for each slot will be in a range (calculated anew after each table use, but that is invariant between enchantments). For zero shelves these are; top 1-2, middle 1-6, bottom 1-8: for 1 shelf; 1-3, 1-7, 2-9 …
[ https://minecraft.gamepedia.com/Tutorials/Enchantment_mechanics for tables]
does placing a torch (or torches) on the floor between the shelves and the table change the offered enchantment levels?
If so, this would indicate that the shelves are being registered.
Rollback Post to RevisionRollBack
WARNING: I have an extemely "grindy" playstyle; YMMV — if this doesn't seem fun to you, mine what you can from it & bin the rest.
I had a very similar problem recently, but I realized my enchanting table was obstructed by carpets, which caused it not to detect the bookshelves through the carpets. maybe someone put string around your enchanting table as a prank? You don't seem to have any obstructing blocks like I did