PEX Outdoor UV Protection
You could use black polyethlene (non-pex) well-water pipe, which is inherently sunlight resistant. Also helps to keep your water from growing algae. Either as a sleeve or as the actual pipe for this section.
You could enclose it in metallic ducting, or PVC that was painted to protect it from UV, or PVC electrical conduit (sunlight-resistant as made, they claim.) I don't think painting the PEX is likely to work.