The National Health Service (NHS) in the UK was set up in 1948. WW2 ended in 1945. I've heard that WW2 was very hard, economically, for the UK (right?). I'm guessing that setting up a socialised medicine system would be very expensive (right?). So how was the UK able to set up the NHS so soon after being bankrupted by WW2?
Which facts are wrong? They appear contradictory. Was the NHS not that expensive to set up? Was WW2 not that economically devastating to the UK? Was WW2 very economically devastating, but there was the political will to spend a lot of money on the NHS anyway?
It was super expensive however at the end of the war, Labour, a left wing political party was voted into party and they aimed to create a better future for all the people who had been affected by the war. Many people were happy with the government planning of the economy and wanted it to continue into peacetime. So things such as the NHS were introduced as a result of the 1942 Beveridge report which detailed the 5 giants (Ignorance, Idleness, Squalor, Disease and Want). This was able to happen due to John Maynard Keynes trip to Washington where he only just managed to get Marshall aid from the USA ($13bn) which was used to rebuild the UK economy but growth was slow and rationing only ended in 1951 1954. The creation of the welfare state was incredibly costly but through taxation and loans from the US the UK was able to implement the large social change, which was in line with the view of the electorate.
Edit: It was really expensive to implement and lead to the labour defeat in 1951 to the conservatives as there was a charge introduced on glasses and it angered Bevan who was the chancellor at the time and it caused a split in the Labour party which Atlee couldn't hold together. Also the lack of consumer choice was used by the conservatives who promised "More red meat". I haven't got all the figures with me but there was around £600m being spent on the NHS alone in 1949, which is a very large amount of the governments revenue, which is why it had to be cut back and privatised in some areas.
Tangentially, did losing Indian Empire (1947) had any material impact on the UK during the same period OP mentions? Not only they lose tax and other revenues, lot of civil employees and army would have returned back with no job as well.