There is a critical period during infancy and early childhood when the immune system goes through a number of critical maturation processes. Afaik, once that's done there's no going back to a perfectly fresh slate.
After puberty, for example, your thymus (an important site for T cell maturation) begins shrinking and eventually all that remains of the organ is basically non-functional traces of scar tissue. That is not to say that T cell maturation doesn't occur afterwards, but it is a particularly striking example of the irreversible age-related change we can be talking about.
Another less-obvious example is that children born by cesarian have a different skin and gut flora through the rest of their lives than children who are born through the vaginal canal: the initial colonization of the skin with a different set of bacteria has some degree of permanence, though it is also somewhat plastic. Yet another example, children who are breastfed tend to have fewer food allergies or auto-immune diseases (atopy, generally) than children who are fed formula. Early conferral of passive immunity through maternal antibodies secreted in breast milk selects for different populations of gut microbes, and again there is some degree of permanence to this. In both cases, the differences are measurable throughout adulthood!