The thing you need to remember here is that you’re in a comic book universe. That means that the universe doesn’t work on normal causality. It works on narrative causality. Which means that events happen according to whether or not they’d make a good story. “A man from another universe blackmails Batman with his secret identity, gets ten million dollars, and is never heard from again,” isn’t a good story. So you’re virtually guaranteed to get kidnapped by a villain at some point, because that’s what the plot requires. Doesn’t matter how careful you are. The Joker’s going to overhear you talking to Bruce Wayne over the phone. Or Two Face is going to stumble over the meeting between you and Batman. Or Scarecrow’s going to unleash a cloud of fear gas over the city as you’re walking away with your suitcase full of money.
And this is going to happen no matter what you do. “A man from another dimension who knows everything about all the superheroes in the world,” is too good a plot hook for the universe to pass up. Sooner or later, you’re going to end up tied to a chair. Your only real hope here is to control what role you have in the story.
First of all, there’s no point in keeping your story to yourself. Someone is going to find out, somehow. All this does is relegate you to the role of McGuffin. And you don’t want that - McGuffins are too disposable. You’ll be dead by page two, once Sinestro has sucked all the information he needs out of your brain. So go ahead and contact a superhero ASAP.
Second, whatever you do, don’t try to blackmail a superhero. Not because the superhero might kill you - as others have pointed out, Batman isn’t going to kill you no matter what, so you’re safe from him. What you aren’t safe from is, again, narrative causality. In the comic book universe, bad guys always lose. And if you’re blackmailing Superman, you’re a bad guy. If you’re lucky, Superman’s just going to outwit you and put you in prison. What would be even worse would be getting away with it. Because if the superhero doesn’t bring you to justice, then you’re pretty much guaranteed some sort of hideous karmic death.
Your best hope is to play everything on the up and up. Get ahold of Superman (or Clark Kent, at least) and tell him you know the secrets of all the superheroes in the world, and that you want to return home before someone uses your knowledge for evil. Then wait around until Brainiac kidnaps you, because that’s going to happen no matter what you do - “Traveller from another dimension returns home without incident,” doesn’t make a very good story, either. But if you make it clear that you’re trying to do the right thing, and are mostly worried that your knowledge could hurt someone else… well, that makes you a good guy. And while that doesn’t guarantee survival, it gives you much better odds at survival than any other path. Especially if Superman is your contact in the comicverse, because Superman comics tend towards happy endings. Stay away from Batman at all costs. If nothing else, you can’t take the risk that you’ll get the one written by Frank Miller, at which point you’re pretty much irrevocably fucked.