In terms of basic compatibility between the Teensy LC, 3.x, and 4.x processors, I put this in the unofficial Teensy twiki:
Basically, the first serial port, the first I2C port, the first SPI port, the basic layout for power, ground is the same among the Teensies. For simple digital pins, pins 0..23 are all in the same position. Likewise, the first 10 analog input pins (A0..A9 or 14..23) are in the same position. But going more than these will involve going into various details.
Sound in particular uses different pins. If you plan to use the audio adapter, you should use revision C for Teensy 3.x and revision D for Teensy 4.x.
This page lists all of the pinouts of the various Teensies:
I have a google spreadsheet that tries to go into detail about the differences and commonality of the pin assignments between the LC, 3.x, and 4.x series:
And this post that I did back before the revision D of the audio shield came out to highlight the differences for the audio pins: