Why is Kw the same in acid, water, and alkali?
You are correct that the concentration of $\ce{[H+]}$ and $\ce{[OH-]}$ both vary based on the the composition (acid/alkaline) of the solution, but the remarkable thing is that their product does not. When $\ce{[H+]}$ goes up, $\ce{[OH-]}$ goes down, in the same proportion.

The reason for this is that the Kw represents the equilibrium constant of the following reaction, and any excess (lack) of $\ce{[H+]}$ or $\ce{[OH-]}$ will react by LeChatelier's principle to reestablish equilibrium:

$$\ce{ H2O &lt;=&gt; H+ + OH-}$$ 

We can write the standard equilibrium constant equation as follows

$$K_{eq} = \frac{\ce{[H+][OH-]}}{\ce{[H2O]}}$$

For aqueous solutions, the concentration of water is a fixed constant1, so we can multiply both sides by it, and fold it into the equilibrium constant2. Therefore we can write:

$$K_{w} = \ce{[H+][OH-]}$$

So just as standard equilibrium constants do not differ with the concentrations of chemical species in the solution, but can vary with temperature, so too does $K_{w}$ not vary based on the concentration of chemical species, but does depend on the temperature of the solution.



1 Technically, the values in the equilibrium constant equation are activities rather than concentrations (see here and ref 1 therein for a rather technical discussion), a distinction we normally ignore, as activities are proportional to concentration in dilute solutions. Regardless, the activity of water in most dilute aqueous solutions can be considered a constant, so it doesn't change the argument.

2 Note this is only true in a solution which is almost entirely water, with just a little bit of solute dissolved. If you had a water/ethanol mixture, or a very concentrated solution of a highly soluble salt, then the water activity can't be considered a fixed constant, and you'd have to start making some adjustments based on it. (This is where the distinction between "concentration" and "activity" come into play - these adjustments are more complicated than just dividing by the nominal concentration of water.)