Indeed, your private keys on Electrum are not at risk of being viewed by nodes. Your public keys, however, are. It is for this reason that it is said that Electrum is not ideal for those wanting a full level of privacy.
I think you mean address not public key. An address is a hash plus checksum of the public key. The public key itself is exposed only when you spend money from an address. That transaction gets broadcast to all the nodes and once it is confirmed it becomes a part of the blockchain.