I’m not sure if it is entirely accurate to compare them in this way, as “Matrix” refers to simply the protocol, whereas “Signal” could refer to the applications, server, and protocol. That being said, is there any fundamental difference in how the Matrix ecosystem of federated servers, and independently developed applications compares to that of Signal that would make it less secure, overall, to use?
The most obvious security vulnerability that I can think of is that the person you are communicating with (or, conceivably, oneself, as well) is using an insecure/compromised application that may be leaking information. I would assume that the underlying encryption of the data is rather trustworthy, and the added censorship resistance of federating the servers is a big plus. However, I do wonder if there are any issues with extra metadata generation, or usage tracking that could be seen as an opsec vulnerability for an individual. Signal, somewhat famously, when subpoenaed to hand over data, can only hand over the date that the account was created, and the last time it was used. What would happen if the authorities go after a Matrix user? What information about that user would they be able to gather?
Key points off the top of my head:
Indeed, end-to-end encryption is unable to protect the endpoints. That’s true of both messengers.
Since you brought it up, note that smartphones generally run system-level software that is controlled by the OS maker, meaning that Google or Apple have the ability to monitor those endpoints. Signal’s approach to addressing this is to offer a Google-free build of their app, if you can find it, buried on their web site and with a scary-looking warning against using it. Matrix publishes their apps on F-Droid, so there’s an easy Google-free option. Of course, most of the people using either messenger will have downloaded from the big app stores, so even if your phone and app are Google-free, it’s likely that most of your contacts’ phones are not.