all they can see is the times at which your messaging app was asked to wake up. Not whether any message was actually received, or what it contained, or from who.
The data these two companies receive includes metadata, detailing which app received a notification and when, as well as the phone and associated Apple or Google account to which that notification was intended to be delivered. In certain instances, they also might also receive unencrypted content, which could range from backend directives for the app to the actual text displayed to a user in an app notification.
Here’s what Senator Ron Wyden had to say on the matter:
So they know: