It's probably most likely dust causing the burnt smell in the modem.
My modem starts smelling like burnt plastic as well but goes away after awhile.
If you're concerned though it won't hurt anything to unplug it when you're not using it. Better to be safe than sorry and start a house fire.
But your modem is probably perfectly fine. A lot of electronics can give off that dust burning smell.