How to solve this generalization of binary search?
The optimal strategy can be found through dynamic programming in $O(n^3)$ time.  Let $A[i,j]$ denote the worst-case cost of the optimal strategy when $T$ is already known to be in $\{i,i+1,\dots,j\}$.  Then we have the recursive relation

$$A[i,k] = \min \{f(j) + \max(A[i,j], A[j+1,k]) : j=i,i+1,\dots,k-1\},$$

with the base case $A[i,i] = 0$.  You can use dynamic programming to fill out this array.  The assumption that $f$ is non-decreasing is not needed; this works whenever $f$ is any non-negative function.