In the limit as the quality of your random sampling method approaches perfect randomness, and in the limit as number of samples approach infinity, then the distributions of the training and testing samples will become identical.
But after considering your comment to dsaxton, it appears that you are in a special case where you are dealing with time series problems.
Usually with common learning tasks when the time of the sample arrival is ignored, it is implied that all samples occur at the same time. Therefore, the PDFs of the training samples are assumed to be the closest estimation to the PDF of the testing set (since they all occur at the same time). In this case, random sampling is your friend.
But, since you are not assuming the simplistic assumption above, instead you are acknowledging the fact that testing instances are necessarily those that appear after the training samples (which is a more realistic assumption), then it is part of your time series problem that your model must deal with the fact that the PDF of the arriving samples changes as a function of the time.
Therefore, when dealing with time series problems, you must not eliminate the shift/change in PDF as time passes across the training and testing sample sets. Instead, take it as a challenge to identify how well your model is adopting to the fact that the PDF is shifting/changing over time.
If you eliminate such challenge from the evaluation by constructing training and testing set that maintain the same PDF (despite the time shift), then you are essentially performing an evaluation that does not show how useful your prediction model is in time series problems.
Alternatively, you can consider that time series problems are a special case of domain adaptation problems, where the domain variation is caused by variations in the time.
So in summary the answer is: you must not ensure identical/similar PDFs between training and testing samples, because it is a primary objective of your model to adapt to the fact that the PDF is shifting by time.
Q: In your opinion, could I use the K-S two-sample test?
Q: Alternatively, can you suggest some other statistical measure or test better than that one to check for the distribution stability?
A: Yes. Do nothing about it. If you wish more samples to better identify the PDF shift as a function time, then this is another problem (where you can find out amount of training samples that you model needs less/more samples compared to other models).