I would cautiously say, yes, Kafka identifies with the hunger artist.
I don't know enough of Kafka's biography to say for sure, but his work consistently features figures who are misunderstood and who feel that their essential humanity is denied by the system that surrounds them.
The protagonist thus becomes a version of the artist - craving a way to express his own humanity in a world where that humanity is often unrecognized.