Most of the places on the railway line between are ok, just a bit...boring. Falkirk, Livingston, Linlithgow. Might be worth visiting them to see, schools are alright.
Doing the whole commute one way will be a bitch (you need to consider end-to-end, especially if the Edinburgh Uni job isn't in the city centre) but is doable. Also expensive.