Liz is in the process of setting up a trust fund for David even though the family's financial situation was in dire straits at the time. That doesn't mean squat in terms of her legal rights
I wish I could remember which episode it is that Liz reminds Roger how/why he was allowed back at Collinwood so I could watch the scene again. But I think your're right that there aren't any legalities hinted about it. I think it's just a case of Liz taking control of David's welfare for the good of the child, and Roger having to acquiesce or get out of Collinwood without David.
I suppose we'll have to wait until someone comes across it while watching the pre-Barn eps on DVD.