From a standardization point of view, $\text{Keccak-}f[25w]$ (i.e. $\text{Keccak-}p[25w, r]$ with $r = 12 + 2\lceil \log_2 w\rceil$) is simply not defined in FIPS PUB 202 when $w$ is not a power of two. Specifically, the Keccak permutation is only standardized for $w = 2^\ell$ with $\ell \in \{0, 1, \ldots, 6\}$. This means that, even if you can define the permutation for other values of $w$, it will be nonstandard.
That said, if $w$ is not a power of two the permutation will be less efficient (per bit). Ideally, your processor has instructions to operate on $w$ bits. In practice, one expects $\ell \ge 3$ for most applications. This is probably the main reason why the standard/original specification do not mention other values of $w$. Also, $w$ isn't allowed (in the standard) to be arbitrarily large because that would be overkill.
From a mathematical point of view, one could also define the permutation for $w$ not a power of two (despite the lack of a good reason). Let's consider each step separately:
- $\theta$ just uses xors of bits and generalizes to all $w$, but as discussed below it is not necessarily invertible.
- $\rho$ rotates each word. This works for any word length.
- $\pi$ is a word permutation which clearly works for any $w$.
- $\chi$ is bitwise along rows, so again no problem.
- $\iota$ adds a constant to one of the lanes. This step requires more changes.
The problem with $\theta$ (thanks to poncho for pointing to this) is that it is not invertible for all values of $w$. In particular, if we represent the state as an element of the ring $\mathbb{F}_2[x, y, z] / \langle x^5 + 1, y^5 + 1, z^w + 1\rangle$ as in the reference, $\theta$ can be written as
$$\theta(\alpha) = p_\theta \alpha = (1 + (1 + y + y^2 + y^3 + y^4) (x + x^4 z))\alpha,$$
Hence, we must have $1/p_\theta \in \mathbb{F}_2[x, y, z] / \langle x^5 + 1, y^5 + 1, z^w + 1\rangle$ and this not true for all $w$.
The reason why the $\iota$ function does not immediately generalize is because it adds $\ell + 1$ round constant bits to bits $2^j - 1$, $j = 0, \ldots, \ell$. The natural generalization would be to do the same thing but with $\ell = \log_2 \lceil w\rceil$. The problem occurs when $\ell > 8$. The round constants are computed using an 8 bit LFSR. If you want more bits, you need a larger LFSR. For all $\ell \le 6$, the same LFSR is used but some output bits are ignored. So you will need to specify another LFSR...
That said, it is not even essential that one uses an LFSR to generate round constants so you could argue that this isn't a major problem.
If $\ell$ is very large, I'm also not sure if $r = 12 + 2 \ell$ rounds would really be sufficient. I'm not going to make that analysis here, though.