Newborn mammals get something called "passive immunity", in which the mother's antibodies are passed across to the fetus or newborn. Depending on the species, this can happen by the antibodies crossing the placenta, or more commonly by being transferred in the first milk the mother forms, "colostrum", which is very rich in antibodies. (At the same time, the newborn has special adaptations to absorb antibodies from the colostrum into its body; this only works for a short period after birth.)
This allows the newborn to have a temporary resistance to whatever pathogens happen to be common in its immediate environment (because presumably the mother would have been exposed to them). It's very much temporary, lasting typically a few weeks or so before the transferred antibodies half-life away. During this time, the newborn has a chance to start developing its own active immunity, which is dynamic and lasts much longer.
Edit to add:
Are there other modes of heritable immunity? Sort of but probably not what you're thinking of. Innate immune responses are often triggered through recognition of molecular patterns that are common to many different pathogens ("Pathogen-associated molecular patterns" or PAMPS). The receptors that recognize these patterns are inherited, and they are essential for starting innate immune responses which are in turn very important for starting acquired immune responses. So yes, every newborn mammal, and reptile, fish, sea urchin, arthropod, nematode, etc. inherits mechanisms for recognizing pathogens.
However, it's important to understand that these don't change during the mother's lifetime. This system doesn't provide any inheritance of recognition of pathogens that are locally important, or that the mother has met during her lifetime. This is the basic toolkit that every individual of the species (often, that every individual in the genus, or kingdom) has, that's needed to answer the general question "Is this a dangerous situation? Should I activate the immune response?"
In other words, as far as the innate system is concerned, "the child has a completely fresh set of 'default' defenses"; the only non-default information that's passed from mother to newborn is via the passive immunity described above.