Could Layer Two Solutions undermine Bitcoin's security in future?
Just as security personnel secure valuables in banks and arenas housing precious objects, Bitcoin has it's own security mechanism; mining ( here for details). This process secures the network against Sybil as well a double spend attacks. In this process, much electrical energy is expended, however, miners are incentivized to carryout the process. Currently, 12.5 bitcoin is the reward for a node who finds the difficulty target first. Transacting nodes on the network also pay a certain amount as fees to the miner of the block the transaction falls into. Currently, the total block transaction fees is about a third of the block reward. This is currently due to a clog in the network which results in competition to have one's transaction confirmed soon enough.
This is where second layer solutions come in. Some worth similar to the data layer in the OSI model, which takes care of data flow, The Lightning Network, Schnorr signature, Mimble Wimble, Tumblebit,... are solutions on top of the Bitcoin Network used to manage data. The closest we have now is the Lightning Network. The success of this project would see most transactions go off-chain resulting in more breathing (transacting) space.
With even more data management solutions coming on board, miners are likely to earn less from transaction fees which would become the main compensation for securing the network in future with the decline in block reward. This could result in reduction in harsh power and increased vulnerability. It's certainly a trade off of convenience for security.
P.S. Happy Bitcoin Day!