How to fit Welch's window segments to a time series of variable length
I don't think there is one right answer / best practice / standard method in this situation. It would depend on your application. I have seen both of those methods used (zero pad/truncate). Alternatively, you could choose a slightly different window length and/or overlap so that you don't have to truncate too many samples (or pad too many zeroes) near the end of the timeseries.