The Scarlet Pimpernel was probably the first "costumed adventurer", with secret identity and all that.
[/quote]
It's hard to say, remember that the first Pimpernel book was actually written in 1905, and The Pimpernel often went in disguise, but never really had a mask or anything like that. As such, he's much more in the vein of Sherlock Holmes, who obviously came first, I think the first 'masked adventurer' would probably be Zorro 1919, (which ties into the whole significance of the Batman origin story, etc.)
[/quote]
While I'm outing myself as a recovering academic and a medieval scholar, let me suggest looking back at least another four hundred and fifty years for the origin of the masked superhero. An entire literary tradition, most famously Le Morte d'Arthur (and book two of The Faerie Queene, for that matter) revolves around honorable, noble, aristocratic, superhuman heroes who routinely hide their identities behind masks (or to be more precise, visors), often disguise themselves as strangers or even as other heroes, and inspire lines of dialogue that can be translated as, "Who was that masked man?"
Batman may also have been inspired by 19th and early 20th century figures, but there's a reason he's dressed in armor and billed as the dark "knight."