Note that initially, “titular” has nearly nothing to do with the title of a book or story or what have you. It has to do with a title, as in an office (like queen or king or president), and with that title being “in name only” with no actual power.
“Eponymous,” though, has everything to do with appearing in the title of a work. Think Jane Eyre. She’s the main character, and her name is the title of the book.
Over time, people have gotten confused and begun to use “titular” in a similar manner as “eponymous.” Now, we can draw a line between them on that front as well. In Kipling’s “The Man Who Would Be King,” Dravot is the titular character. He’s the one who comes up with the scam that costs him his life and lands Carnehan in an asylum. His name doesn’t appear in the title, but he’s the one referenced in it.
It’s another case of language change, and another thing that peevers peeve about. Keep in mind that unless the title is a name (Oliver Twist, Eleanor Rigby), “eponymous” isn’t the right choice.