The PID function is a linear function and will only work optimally on a linear process or a quasi-linear segment of a non-linear process unless you change the PID gains as you move through segments of the process.
However, there are sensor feedback signals that return a non-linear feedback of a linear function. One example would be using differential pressure across an orifice plate to determine flow. In that case the pressure feedback value would need to be "linearized" in order to provide the PID function with the linear feedback it would expect to see.
Having said that I have on a few occasions intentionally provided non-linear feedback of a linear process to a PID function. In those occasions I had a process that could "wander" around the setpoint without creating any issues but absolutely needed to stay away from the process limits. By squaring the error to the PID function I could keep the system stable, albeit mushy, around the setpoint but at the same time aggressively correct for large deviations in process variable. But this situation is by far the exception as opposed to the rule.
Keith