Can you give an example of such a function? They very well may exist. But I think we can agree that non-differentiability of the target function is not sufficient.
The function that describes the neural network itself has to be differentiable. Whether we can create a differentiable function/NN for any kind of input remains to be shown.