Actually Ozark Lady, you may not be correct in your assumptions. You see, I brought a tobacco hornworm inside to raise (what can I say
After a few days, it crawled off the leaves and started seeking corners, so I tried giving it a pie plate of soil and leaves and debris, but it wouldn't have any of it -- crawled in the darkest corner between the paper towel and the plastic tub, turned very black but stayed full length for about 36 hours, then started to shrink until it is now nearly 1/3 the original full length as a pupa.
Assuming same process of metamorphosis for moths, the caterpillars basically liquify inside the chrysalis/cocoon prior to reorganizing and metamorphosing into butterfly/moth. I think that's what you found.
Oh! Another thought -- either that or the one you found was already infected by Tachnid fly maggots and the maggots came out of the near-to-pupating body, in which case, the caterpillar/pupa will become liquified and black.
sheeshshe, I think the "weird greyish caterpillar" you found is probably a cutworm... a climbing
cutworm if it was up climbing around and not curled up in the soil.