If you don't want to open the walls to reroute or insulate the pipes and you don't want to waste water, but you don't mind slightly increasing your hot water energy bill, you can set up a hot water recirculating pump at your water heater and a thermostatic bypass valve at the washing machine water supply.
The circulating pump (example) is usually installed inline with the hot water flow near the water heater, and it is usually stainless steel. It must be running during freezing weather.
The thermostatic bypass valve (example) should be installed between the hot and cold water supply at the washing machine, and you must leave the red and blue laundry valves open in freezing weather.
In operation, when the bypass valve body is less than 90 degrees F, it allows water to flow from the hot water pipe into the cold water pipe. The stainless pump provides a slight pressure differential between hot and cold, so warm water flows through the bypass valve into the cold water pipe and returns to the water heater. No water is wasted. As soon as the bypass valve body reaches 90 degrees F, the valve closes and water flow stops. This valve is designed for use under a sink, so you will have to make an adapter to work with laundry connectors.
In my experience with this system, a little water circulates about every 15-20 minutes with a barely audible hiss. The hot water pipe stays lukewarm all the time and the cold water pipe stays tepid, not warm, but definitely not cold enough to freeze.
I have this setup in my house where a previous owner ran pipes to reach a second floor bathroom through an unheated space. Those pipes would freeze starting in November. Since I installed this system, there have been no freezes, even though the temperature went as low as -18F. The system works.
If you are ambitious, you can hook up an outdoor temperature sensor to control the pump so that it only runs during freezing weather. If you are concerned about leaving the laundry valves open, buy new steel mesh laundry hoses.