The composting will be a diluting process. The other materials such as earth and rotting biological matter will tend to block the sharp diatom exoskeletons from damaging an insect by physically getting in the way. The effect will still be there, but greatly blunted. Also, liquids tend to reduce the cutting effect through creating a lubricious coating on the cutting edges. Since compost bins are a relatively wet environment, this effect is guaranteed. For those that ingest the de the only remedy will be that it is in a mix with a vast amount of other material. All in all, there is no real problem for the insects or their larvae in compost that contains a small amount of diatomaceous earth.