You misunderstood, I mean for the top to be flat but the "underground" to have some kind of shape to compensate for the gravitational pull at all points on the flat surface. For a 2Dish example in the ballpark, you could think of one of these wooden toy bridge blocks:
https://thumbs.dreamstime.com/b/natural-wood-blocks-364582.j...I think you could construct a curve such that the mass's gravitational pull on the right cancels out the pull on the left, for any point on the surface.