"of a kind" modifies "refuge". "refuge, of a kind" means something like a refuge, but not one that is fully satisfactory or perhaps fully deserves to be called that. "of a kind" is a set expression.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.