Poland and Spain will work together to develop a high-speed rail system.