I was trying to erase my DVD-RW disk in Disk Utility, and every time it had finished erasing it (either in Quick or normal mode), the disk would mount again with the same data visible.
A bit of poking around on the commandline revealed the optical disk cousin of hdiutil, namely drutil. So from the commandline you can do
drutil erase full
to erase a DVD-RW disk (I’d guess it works for CD-RW discs too). You then have to wait of course for it to blank all of the disk of course, but at least it’s actually erased so you can then re-burn it.
You could of course try
drutil erase quick
Also supported are
drutil bulkerase full
or quick for erasing lots of disks.