A player teleported inside a wall causes massive view desync for the player and lags the server
I don't know if only partly inside the wall lags the server or not as I've not found maps which teleport the player fully inside the wall.
Also worth noting is that if only the player's head is inside a ceiling so that the player can get unstuck by crouching (as their head lowers, feet don't rise) there isn't anything notable lag or desync -wise.
I do not know if this is a q3compat issue as I've only countered maps with "bad" teleport destinations which have a .defi file innately in them for automatical q3compat activation.