My best advice = taxi.
If you leave through the International Gateway from Epcot and walk to or ride a friendship to the Boardwalk, you need to return to Epcot when it is open if you want to walk through it to your car.
You could go toyour car and drive to Boardwalk and park, but that can be dicey depending on parking conditions at the BW.
Taking a bus to the MK and then riding the monorail back will not work depending on how late you stay at the BW. It is my understanding that the monorail only runs 1 hour past the park closing time.
AI do not remember if there is a bus from BW to Epcot, but again, they may not be running when you want to leave.