Let's start by defining some coordinates:
The hubcap rolls in the x-direction, spinning about the z-axis. Its angular momentum is
where I is its moment of inertia and ω is its angular velocity. If we approximate the hubcap as a thin, solid disk, we can write
where m is the mass of the hubcap. If we also assume it rolls without slipping, we can replace ω with a linear velocity, v:
The hubcap won't be perfectly vertical when it pops off the wheel, so gravity will apply a torque, tipping it over. The amount of torque will depend on how far the wheel is already tipped. We'll call the angle off the y-axis that the hubcap has tilted θ. Then the torque applied by gravity is
Torque and angular momentum are related by
so we'll need to generalize our previous equation for L. Taking the tilt of the wheel into account, we have
Plugging this into the relationship above, along with our equation for τ gives the differential equation
We're not interested in the z-axis rotation, since this will remain constant, but picking out the x rotation,
Solving this gives
where C is some constant. The hubcap will be on its side when θ = 90°, so solving for t in this case gives
We can put C in terms of the initial tilt of the hubcap with
Plugging this into the equation for t gives
To get an idea of how this varies with θo, we can make a plot:
Although the time can go to infinity with a perfectly vertical tilt, it quickly drops off with any slight error. Going at highway speeds, a tilt of just 0.00001° will cause the hubcap to fall over within 23 seconds.