It could mean that there is a real - life event or situation where someone is being compared to a cockroach. Maybe in that story, someone was very resilient, just like a cockroach is known for its ability to survive in tough conditions.
It could also be an author or storyteller who is using this phrase to introduce a character in a story. The true story could be about someone's struggle and the use of 'call me cockroach' is to immediately give the reader an idea of the character's view of themselves - as someone who has to be tough and resilient, much like a cockroach.