You are right that it's in disagreement with itself tense-wise, and that is what makes it ungrammatical.
✗ 電車に乗ったときは、白線の内側でお待ちください。
✗ "When you got on the train, please wait on the inside of the white lines."
電車に乗るときは、白線の内側でお待ちください。
"When you get on the train, please wait on the inside of the white lines."
As seen by these translations, if you treat that 〜た as the past tense, it doesn't make sense. In the 〜る case, it can be interpreted either as referring to a single future event, or multiple future events, as in English.
You might ask, "why do you have to treat this 〜た as past tense, as opposed to stative, like in 「乾いたタオル」 'dry towel' or 「タイプされた論文」 'typed paper'?"
The answer is that stative 〜た only works when the actor is not critical to the state. In this case, 「電車に乗った」 is about an actor who is getting on the train, so the stative 〜た reading is not possible.
I detail 〜た in relative clauses in this answer: What are the general principles of using verbs to modify nouns (ex 焦げるトースト/焦げたトースト)?