Does a transaction get sent to the Blockchain when you use the Lightning Network to send payment to someone you're not directly connected to via an intermediary node? Because, according to what I've read, only the first and last transaction appear in the Blockchain, I'm not sure if those involving an intermediary node will as well.
You are confusing different concepts here.
Lightning transactions are never committed to the blockchain. It does not matter if you pay someone you are directly connected to, or if you pay someone via 20 intermediaries. These transactions do not get broadcast or mined on the main layer.
The "first and last" transactions you have read about are the transactions to open and close your Lightning channel. Let's say you open a channel with me. That opening transaction is broadcast and mined on the blockchain, even though we haven't actually exchanged any coins yet. We can then pay each other back and forth as many times as we like, and if I am connected to other channels too, then you can pay other people using me as an intermediary. None of those payments, either between us or you using me as an intermediary, are broadcast or mined. When one or both of use decides we want to close our channel, then the closing transaction is broadcast, just like the opening transaction was.