Franz Kafka’s The Metamorphosis and Fyodor Dostoevsky’s Notes from Underground definitely make an interesting comparison/contrast essay topic.
When writing introductions, it is important to keep in mind that the writer should present the topic to the reader in a general way that covers the overall purpose of the essay. You want to avoid getting into the specifics—that is what the body of the essay is for.
So, with this topic in mind, you might want to say something about how each of these classics is an example of existentialism, in the sense that the main characters in each work suffer from a sense of overwhelming alienation and a feeling that life, at its core, may be nothing more than an absurd experience that offers little chance for happiness. (Depressing, I know! Don’t let the topic get you down.) That would take care of the comparison aspect of your topic without getting into specifics from the novel.
As for contrasting the two, you might want to state in your introduction that, although both works show characters struggling with this view of the world, they approach life differently. Kafka’s Gregor tries to bond with his family and fit in and find meaning in the life he lived before his transformation, while Dostoevsky’s Underground Man has almost completely cast off his earlier life and treats others with disdain, often avoiding them altogether.