The California law does not require age verification. Only attestation. From what I have heard the Colorado one is basically identical.
The NY one I have heard is more stringent. But I have not read that or the Colorado one.
While I can’t comment on any case law surrounding compelled speech. I don’t thing that this would qualify as compelled speech.
Just based off a quick web search it seems that compelled speech is more about the government telling news organizations to report what they tell them.