That means all the address are somehow connected.
no it doesn't mean that. it means your keys were created pseudo randomly from a random entropy instead of each from a different random entropy. the end result (the keys) are still considered random and unrelated.
So if i sign a message say "This is to be signed" with Address 1 and sign the same message "This is to be signed" with Address 2 in electrum wallet and post both the signature online. Then will someone be able to recover my private key of any of the address?
to put it simply, if it were possible to find your private key from a signature like what you explained then nobody could ever use an HD wallet because the signature you create for a message is using the same algorithm as the signature you create for a transaction.