SD card stuck in 2011 iMac CD drive
For those of us still working on old iMacs that have a CD/DVD drive this is a perennial problem. Back in 2020 there were dozens of suggestions for the removal of the offending SD, none of them really worked. The reason why this happens so often is that the drive is far too close to the SD card slot and being on the side of the iMac out of view it is extremely easy to do this.
The only way to remove the SD is to have the machine taken apart (and the CD drive) to reclaim the SD. This is not cheap.
The way to avoid it is simply to buy an SD card reader that plugs into the USB port at the back of the iMac - well out of harm's reach.
The modern iMacs don't have a CD drive (bought separately) and don't have this issue.
iMac 27″, macOS 10.13