Short answer: A full substitution isn't really the prevailing view among researchers, but a partial substitution is possible in some cases.
While it's tempting to think that an increase in pet ownership may contribute to the decline in fertility rates in many developed nations, the available data suggests that it's more likely that having fewer children simply leaves more resources (time, attention, money) available for parenting pets, as it does for many other leisure activities that are equally on the rise.
However, as suggested, there are many different reasons for pet ownership, and no doubt among some subset of adults, pets fulfill certain needs that might otherwise be fulfilled by children, such as emotional, social, and self-esteem support, and possibly the need to nurture, protect, train, or otherwise parent.
There are several good literature reviews that consider this question specifically, and are worth a read if you are interested in in-depth analyses. Note that evidence is relatively sparse at this time, so conclusions are by no means definitive.
Volsche (2019): Understanding Cross-Species Parenting: A Case for Pets as Children
Though child-free pet parents are highly engaged, invested, and bonded
with their pets, this should not suggest that they are confusing pets
for children. Though Veevers (1980) found that there are those within
the child-free community who engage in pet parenting as a substitution
for human children, she warns that the “fur baby” stereotype is less
common in practice; a vocal minority within the population.
Serpell & Paul (2011): Pets in the Family: An Evolutionary Perspective
Among the Bororo people of central Brazil, ownership of pet macaws is
almost entirely limited to women, and the standard Bororo explanation
for why some households keep more of these pets than others is that
these are the homes of women who have previously lost many children
(Crocker, 1977).
These authors review several reasons for pet ownership, including parenting practice, and finding mates, both of which might contribute to (rather than reduce) fertility rates.
Aruah, Ezeh, & Tom (2019): Relationship between Pet Ownership, Pet Attachment and Decision to Have Children among Single People in the United States
Although the want for children has reduced, the need to love and have
a companionship has not. Human beings still crave for someone to care
for and nurture, and so they acquire pets. ... animal companionship
can provide a sense of nonjudgmental social support, a form of support
that can be difficult for people (including supportive spouses or
friends) to provide and for some, pets may become like surrogate
friends, mates, or children.
There is also an interesting study by Hahn, Wang, & Yang (2013) that considers actual causation (rather than just correlation) by checking the effect of abortion legalization - a policy change that resulted in fertility decline - on pet ownership:
... abortion legalization raised the probability of owning pets by 15
percentage points for working women, but by only 8.8 percentage points
for women not in the labor force.
These results suggest that pet ownership is more affected by wealth than child rearing, as non-working women - despite having more free time - did not increase their pet ownership as much as working women following the legalization of abortion in their state.
We find that the demand for pets is affected by liberalization of
birth control methods, suggesting a substitutable property of pets for
children.