And here's exactly the challenge. Google will not tell you how exactly they use your data. What you can check though is what data the keyboard is able to access, and then imagine the worst. Here's an excerpt from Play store, of Gboard's permissions:
find accounts on the device
read your contacts
view Wi-Fi connections
read your own contact card
find accounts on the device
read the contents of your USB storage
take pictures and videos
record audio
download files without notification
full network access
control vibration
read terms you added to the dictionary
measure app storage space
use accounts on the device
prevent device from sleeping
read Google service configuration
run at startup
view network connections
add words to user-defined dictionary
find accounts on the device read your contacts view Wi-Fi connections read your own contact card find accounts on the device read the contents of your USB storage take pictures and videos record audio download files without notification full network access control vibration read terms you added to the dictionary measure app storage space use accounts on the device prevent device from sleeping read Google service configuration run at startup view network connections add words to user-defined dictionary