Creators are not paid by advertisements, they're paid by the channel that broadcasts. Either the channel will be subscription based, publicly funded, or are doing something like placing the children's content directly before adult content such as a news program.
In the case of Sweden there's a TV license funded broadcaster: https://en.wikipedia.org/wiki/Sveriges_Television