Here are a few sources I found by searching for "historical geospatial data." This is not an exhaustive list. I encourage you to do the same search, and if you find other sources please post them as an answer.
Historical Country Boundaries
For Historical Country Boundaries, check out this post on GIS Lounge. Most of the date ranges are outside your target timeframe, but there are a couple that might have data for Europe 1939-45:
World Historical GIS Data: 2000 BCE to 1994 CE
While the site is now defunct, Oracles, Thinkquest.org site consolidated a series of country boundary data into shapefiles. Created as an educational site in 1996 and acquired by Oracle in 2002, the site went defunct in 2013. Thanks to the Wayback Machine, the shapefiles of country boundaries spanning between 2000 BCE and 1994 CE can still be downloaded. The data itself should be used with caution and only for small scale projects. Created by students, the archived disclaimer page explains that the data has a spatial error of roughly +/- 40 miles and the best available information, especially for the oldest years, is not the most reliable.
Download: Historical country GIS data from Thinkquest
Britain Historical GIS
The site A Vision of Britain through Time from the the University of Portsmouth has made historical boundary information for counties, parishes, and constituencies for England, Wales, and Scotland available for download in shapefiles format. The data downloads cover a variety of timeframes in the 1800s and 1900s. The county information is available for free download but the constituencies and parishes are offered under restricted downloads.
Download: A Vision of Britain through Time
RT Wilson's excellent free GIS data archive has links to these datasets that mention historical data. Not all of them specify a date range, so you'll have to visit the individual sites to see if they have WWII-era data.
- Belgian Historical GIS: Historical GIS data focusing on population and boundary changes.
- East Flanders Data (Belgium): Cadastral data (including historical data), orthophotos and more
- Kortforsyningen: A wide range of data for Denmark including aerial photos, LiDAR data, historical maps and more. Registration required
- Irish Environmental Protection Agency: A wide range of environmental data including a generalised rivers/streams dataset, CORINE landcover extracts, soils, historical mines and more
- geo-spatial.org Romania: Good selection of vector and raster layers for Romania, including historical information.
- Also check out the other countries in the
Individual Country/Area Datasets section of the archive. Some of them may include historical data that just wasn't mentioned in the description.
Historical infrastructure (roads, railroads, etc) seems like a much bigger ask. I suspect that the best you can find will be images of maps. OldMapsOnline.org is a great source of georeferenced scanned historical maps. If they don't have what you want already georeferenced, it may be waiting in line for someone else to georeference it. So while you're there visit the "get involved" link and help out by georeferencing a few old maps. When I recently helped georeference several maps, one of them was a German WWII-era map of a city in Great Britain, which included critical infrastructure like major roads, railroads and bridges.