Should they be stored with or without rims inside?
Or should they be kept away from plastic for long term storage?
I can't speak to "best". But as a point of reference, many many of my lego tires are many years old and they are usually stored on rims. The older tires were often not removable from the rims. As I rarely build cars, I take no special care of the tires, and I've found that there doesn't seem to be any particular problems. The rubber ages over time, but this is true of all rubber in all circumstances, and the storage method doesn't seem to have affected them much. I have these large tires from an old space set from 1983
that are in excellent condition; sadly, the rims they were mounted on
were fragile and many of those are broken. But the tires are okay.
Should they be stored with or without rims inside?
I cannot say for sure whether storing tyres with or without the rims connected affects the lifespan. In my experience it hasn't made any noticeable difference.
There are four practical reasons I can think of not to remove the tyres.
Tyres and rims stored together use up less space compared to storing them separately.*
It can be difficult to find a tyre that tyres that match certain rims, this depends of course on how meticulously you sort and store your parts.
The only reason I store the '56145' rim on its own, is because it can be used with tyres and treads.
Or should they be kept away from plastic for long term storage?
If by long-term you mean several years/generations then it wouldn't do any harm to store them separately.
* A comparison of a rims of six wheels of the same type stored without and with connections. This can make a big difference in a large collection.