Nuclear-spin polaron formation: Anisotropy effects and quantum phase transition