Hmmm, here's one possible, unlikely twist, sort of a dark mirror predicament. For each secret you wish Vecna's library to reveal to you, Vecna also gets his choice of a secret to reveal to you. These secrets may be horrible, blasphemous lore that is unfit for mortals to know (ala Call of Cthulu) and may have a number of severe drawbacks in mechanical terms (driving you mad, nightmares, etc). A gamemaster who is especially creative in his fiendishness may reveal secrets that complicate the lives of the PCs more indirectly. Such knowledge can burden the group with knowledge that muddies the waters of the game or disturbs how they view the world, demanding new action be taken now that the veil has been lifted. Soothsayers often refer to their gifts of precognition as curses, so to speak, for this reason.
Another option is that for each secret they uncover, Vecna gets to reveal one of their secrets to their enemies or others to whom they conceal secrets from (or perhaps, in some cases, to everyone in the world). A skeleton in the closet of the necromantic mage? Not anymore, it’s as plain to see on him as the cut of his jib.
One final option is that for each secret they find, an eldritch abomination is unleashed upon the Material Plane (perhaps a material manifestation of the secret they “unlocked”?)
On another note, if you want to have a few combat challenges for them in the library, there are a few monsters that might fit thematically. One possible monster that fits the theme of secrets is the palimpsest. An intelligent magical scroll, it sits in wait for prey to come to it and then lashes out at them. Its cut drains blood that it absorbs. In some cases, it can absorb people whole into its pages. This creature was detailed in the 2e Monstrous Compendium annual volume 2.
Another hazard to fight in the library could be Eberron’s living spells. This would allow for a lot of unique and unpredictable encounters.
Perhaps to enter the library, one of the characters may have to bear one of Vecna's body parts (one of the famous ones like the Eye or Hand- or perhaps one of the lesser known ones like his relics from Die Vecna Die). Finding such artifacts could be quests in themselves (like infiltrating one of his priesthoods).