You should look into the functional group variety present in β-Lactam varieties as compared to the few functional groups in sterol varieties. The compound classes therefore exhibit differential lipophilicity. Which one will pass a synthetic bilayer is up to the exact physicochemical behaviour of the synthetic bilayer (meaning the properties can be engineered), but will lean in favour of one compound class. The applicability of those concepts to transdermal application of such drugs seems like a far fetch to me and is more a question of biology. E.g. The corneum strata layer consists of dead cells where the cell membrane is degraded and sphingolipids act as anchors to deeper tissue. Sphingolipids and lipid bilayers may show some similarity in physicochemical behaviour but are clearly not the same system.