I have a Tiefling Warlock character that I think I would like to worship Vecna, to uncover more secrets of her pact and unlock more power. How would a character like this refrain from falling from this moral tightrope, into evil. I have also considered worshiping a group of gods, perhaps the Raven Queen, Vecna and Corellon?
The D&D gods are a pantheon
I'll get into Vecna's personal issues later and how they make this weird, but a common mistake in trying to get a handle on the D&D pantheon is forgetting that pantheistic cultures have much more complicated relationships with their gods than monotheistic cultures.
A Norseman might have felt particular kinship with Thor or Freya, but he would not have spurned Odin; each god has some part of his portfolio which is relevant to everyone at some point in their lives, usually frequently. You'll pray to whichever god is appropriate at the time: for rain, safe travel, health, revenge, insight, courage, finding your glasses. Whichever god you find yourself praying to more often, you may consider him your patron or that he's "your" god, but it's not an exclusive deal.
Even a priest of Osiris isn't going to begrudge Thoth a prayer if it's appropriate, so your character considering three gods as his patrons? Isn't too far-fetched.
Vecna probably failed kindergarten
Here's where the real-world cultural analysis breaks down: where Loki is gonna be helpful or not depending on which side of the bed he got up on, the D&D gods are a bit more predictable: evil is evil (my alignment rants are happily irrelephant to this answer), and some of them --like Vecna-- got "Does Not Play Well With Others" on their daycare reports all the time.
It's hard to ignore "Oppose the followers of all other deities so that Vecna alone can rule the world," and I don't think you should try to. Just as you don't have to devote yourself to one god at the exclusion of all others, you can say "That Vecna guy really gets how I feel about knowledge" without buying into his manifesto. This could be an interesting and compelling source of inner and outer tension for the character, especially if he's also following the teachings of a goddess who probably froths at the mouth a little just thinking about Vecna.
This sounds like a great idea to support a deep and round character concept
With the Raven Queen's ideas about fate and death balancing Vecna's rabid egotism, and Corellon providing a counterpoint about beauty in all you do, you've got a really dynamic tension going. If it were me, I'd probably have the character feel Corellon and the Raven Queen are better spiritual advisors, and turn to Vecna for more practical "how to use secrets" pointers while doing his best to avoid the attached dogma.