I'm going ahead and accepting a summer contract based on funding with the intention of leaving if something better comes up
Why are you accepting the contract with this intention?
I need the flexibility and I don't want my whole summer to be planned. Also, I don't want anything to hold me back.
It is okay that you ensure the best outcome for yourself and your career. However, you should not accept a contract that requires a deeper obligation than you can provide. You will appear unrealiable and you will not be able to use the job for a reference.
I don't care about their references.
Even so, this is unprofessional and help build bad habits. Don't take on the obligation if you aren't prepared to give 100% to see the obligation through to the end.