It is not a foregone conclusion that the universe must have a Harry Potter series of YA novels in it. Nor is it required that if such a series exists, that they be exactly as they were written. In our universe, we have seven books of Harry Potter, following an archetypal plot arc.
There is no particular reason we should believe that if Harry Potter did not exist, there would be nothing similar enough to Harry Potter to serve as close substitute. Kids could have gone nuts for Barry Brassgears, the steampunk airship cabin-boy that ultimately grows in knowledge and ability to defeat Max Clanks, the industrialist bent on clearing the skies of all independent captains. Or maybe they could have latched on to Sirene Ceta, the young mermaid adventuress who stumbles into a scheme by landswoman Gail Greywave to seize control over the Pacific salmon runs, and foils it. I just made these up, but anyone can write an automated generator to spit out these pitches.
Without the copyright-based business, the type and the quality of the popular stories change, but they still get written. The problem becomes discoverability, because it is harder to make money by promoting someone else's work. More promotion creates more copies, but you can no longer monetize the copies directly. You only have author goodwill and branding to work with.