I just generated a Electrum wallet with the Segwit option on. I wonder what happens if I try to transfer SegWit -> Non-SegWit or Non-SegWit -> SegWit: Will the funds be confirmed and get transfered or will it be lost forever?
what happens if I try to transfer SegWit -> Non-SegWit or Non-SegWit -> SegWit
As long as you are using software that supports doing so, this is perfectly possible and fine to do.
Will the funds be confirmed and get transfered or will it be lost forever?
Bitcoin can never be lost forever because of an unconfirmed transaction. For an unconfirmed transaction, the bitcoin do not move from their starting address until they are confirmed in a block. Eventually a transaction may be confirmed, or the network's nodes will remove the old unconfirmed transaction from their mempool's, and you will be able to spend the coins again. There are a few of ways to push unconfirmed transactions through, like replace-by-fee (RBF) or child-pays-for-parent (CPFP).