You sure these aren't installed in a dado (a slot)? Keep in mind that when glue is used, the nails are often just there as glue clamps...they may not be providing much strength except in shear. A good glue joint will break the wood before it breaks loose. You might be able to cut these out, but it would be tough with something like a toekick saw. You'd have to use a blade capable of cutting the nails, or you'd ruin the blade. If you don't care about the existing shelves, you should be able to cut most of it away with a saber saw. If you use a flush cut blade, you can cut up to the sidewalls. If you made a bunch of parallel cuts, you might get enough where you could use something like a flexible cutoff saw in there and then saw the rest out. You may just give up, keep the doors and drawers, and maybe the face frame if possible, and just replace the rest of the carcass.