It is not prohibited in California under EDC §49011, though your local board could make it prohibited. In-person solicitation of goods or money during school hours is prohibited in NY state, under Regents Rule 19.6, but recruiting children during school hours is allowed.
Are there any laws or regulations restricting public (or private for
that matter) schools from soliciting donations from 7-year-olds?
No. Some particular schools might have informal policies on the subject but the conduct you describe is common and not illegal.