I have a large tank that I do have a foam under it and there are no problems with it.
My quastion is, can you put a foam under a tank with trim around the bottom?
I would not recommend it. The trim helps evenly spread the weight of the tank around the base perimeter. The best thing to do is make a glass tank as level as possible. I have foam under my rimless glass frag tank. My glass reef tank has nothing under it. It has been sitting on a 2X6 frame only supporting the perimeter for 4 years now.