Yes, at least in the US: https://en.wikipedia.org/wiki/Safe-haven_law
Nebraska had an accidental experiment by omitting an age limit on their Safe Haven law. Parents drove thousands of miles to abandon their older children until the loophole was closed.
Now that's intriguing; it almost sounds like the state is willing to take possession of children in exchange for a monthly fee.
Like I said above, it surprisingly difficult to get a straightforward answer to this.