When using encrypted chat, message contents are securely encrypted. Attachments as well, as they're secured by keys exchanged through those some encrypted messages.
Matrix does leak quite a bit of metadata that a few other apps, like Signal, doesn't leak.
If you're sharing family photos, it'll probably be secure enough. If you're committing crimes or shit talking your oppressive government, probably best to pick something else.
If you're not comfortable with all the data shared with some of these companies, you may want to find a matrix homeserver with a more suitable privacy policy, and perhaps a matrix client app that doesn't collect as much data. Do note that some information, such as encrypted attachments, may end up on other servers if you talk to people with accounts on matrix.org. It's the same as with email: you can use protonmail pretty securely, but if you send an email to @gmail.com, Google may be able to read (parts of) it.