Is the preposition “in” only used with the future tenses when talking about time?
Noooooo, I don't think so. Other than the difference between "in X weeks" and "after X weeks", which user105719 pointed out correctly, I think the use of "in" in all your sentences is correct.
For example, we often say things like these during job interviews:
[Describing a task/responsibility from a previous job] "The draft had to be completed within 48 hours. I was able to finish it in 13.
There are many examples of the use of "in" in the past tense when talking about time.
I finished/completed/earned my degree in less than 4 years. [Many people will use "within" instead of "in less than"]
In the period 2009-2010, Canada experienced historic levels of unemployment.
He ran 3 kilometers in 30 minutes yesterday.
He lost 21 pounds in 3 weeks. That's just crazy!
"In Three Days, the Hallmark Channel Managed to Upset Pretty Much Everyone." - The Wall Street Journal
"While the early demonstrations were legally-approved marches, almost everyone who has attended protests in recent months has been at an event deemed unlawful." - CNN
"DeBoer Has Learned a Lot From Allen in 11 Months." - Sports Illustrated