In Australia generally speaking a literary, dramatic, artistic or musical work made pursuant to terms of employment belongs to the employer. That position can be modified by agreement, but in the absence of agreement if you get paid a salary for doing it, it belongs to the boss. If you're not an employee then it belongs to the author, again subject to modification by agreement.
Things like sound recordings or films are different, copyright in those would belong to the person who owns the equipment on which they were created. That could be the school.
A contract with a child to assign copyright may well not be enforceable. A private school might include an indemnity by parents in favour of the school in their contract with the parents. A public school couldn't insist on it.
In either case if a school board, without any contractual mechanism, simply declared that they owned copyright in students literary works it would have much the same legal effect as if they had declared they owned Manhattan with an option on Rhode Island.