True, you're right, I was just thinking in an arbitrage way and I thought you meant to short the Cash as well... otherwise it's just a bit of a gamble.
This is not correct. SPY is a security. It's dividends get paid out on ex-div date just like a stock. SPX is a cash index. And like ALL cash indices, you have to calculate the net present value of all the future cash flows to the present. THAT is why the SPX trades at different levels from SPY. The reason ES and SPX are not the same is because of the time value of money. If I buy ES futures that is roughly 107,000 notional yet I only have to put up about 5k in margin. That means I can invest the other 102,000 in the short term rate market and earn interest on the cash. You will see if you do that, the value of ES and SPX are equal.
To add to what Maverick described, you can google the somewhat inappropriately named "cash-and-carry arbitrage" to get a detailed explanation of how it all gets priced.