"comment" and "to" of malleated transactions I'm using the bitcoin core wallet and trying to build some programs around it. I see that comment and to can be added to transactions locally. If I understand it correctly, both are stored in local database and are not public information.

The question I have is whether this will help with malleated transactions. For example, if the transaction I initiated is changed a bit (still valid) and added to the blockchain, would the bitcoin core client attach the comment and to to the malleated transaction when I query for recent transactions?
No, it would not because the malleated transaction is technically a different transaction. Transactions are identified by their hashes, not the inputs or the outputs of the transaction. Since malleating a transaction means that you are changing part of the transaction, its hash will also change. This means that the malleated transaction is actually a different transaction and will be treated as such. So no local information from the original transaction will be added to the malleated transaction unless you explicitly add it.