It looks like a spring with a variable pitch won't work as you expect, i.e., it'll still be linear.
To prove it, we can, for example, take a compression spring and treat it as a number of short springs connected back to back.
When this spring is compressed, all short springs will experience the same compression force and will shrink by $\Delta x_i$, which will be proportional to that force.
Since the total shrinkage of the spring, $\Delta x$, is a sum of all individual shrinkages, it will also be proportional to the applied force.
Obviously, this will be the case even if spring constants of individual short springs are not the same. Therefore, a spring with a variable pitch may have a different overall spring constant, but it will remain linear, i.e. $F=-k'x$ will hold.