Melamine will sag if the shelf is very wide. If your planning on building the rack so the tubs go in width-wise then it shouldnt be a problem as the unsupported end will only be around 18" or so. If your planning on a length-wise rack then you will have an unsupported shelf almost three feet long, which will sag (measurements are guestimated but you see the point).
You can use wood if you want, you just have to seal it.