Polynomial inverses of 2D transfer matrices and finite memory realizations via inverse systems