I have dug deep into the above question but there are a few questions which can help me decide which to buy...
1) Both the above phones have the minimum requirements for Android 3 but will samsung and htc support their phones till then....coz i plan to develop for android and i want that phone to get android 3 in future ????????
2) Do any of the above lag on android 2.1
3)Is the UI customizable for both....and if yes can we port the sense UI of HTC on the galaxy
1_No one knows for sure, but if their hardware supports Android 3 but there won't be official downloads from HTC/Samsung,then you can download cooked ROMs.
2_I haven't seen any reports about Desire lagging, however Galaxy S has some lag issues(there are fixes you can find around the web though such as software updates)
3_I'm not sure about porting HTC Sense to Galaxy S but the vice-versa is possible, i think you can find some cooked ROMs with HTC sense on Galaxy S too.
4_Just like Kevin said,yes you can root both