Using PEX for baseboard run
Yes. In fact, I had to do this exact same thing in a house in MN that had baseboard copper freeze and burst in an attic. I ended up replacing the cooper between the boiler and the baseboards with PEX. 

I'd suggest using SharkBite connectors to transition between the copper and PEX. They're designed for that and it's super-easy to install. 

As Ecnerwal points out, be sure to use PEX with an Oxygen Barrier. 

While doing this, be sure to fully insulate the PEX. PEX can withstand freezing, but it's best to avoid freezing in the first place. If you can move it into conditioned space, that'd be best. If not, wrap it in quality pipe insulation (not the cheap stuff but the ones that self-seal). 

The biggest challenge might be finding just the small amount of PEX needed as they are often sold in large rolls. You may want to check with a plumbing supply warehouse to see if they'll sell you a remnant piece.