The paper studies a class of multidimensional optimal stopping problems with infinite horizon for linear switching diffusions. There are two main novelties in the optimal problems considered: the underlying stochastic process has discontinuous paths and the cost function is not necessarily integrable on the entire time horizon, where the latter is often a key assumption in classical optimal stopping theory for diffusions, cf. [22, Corollary 2.9]. Under relatively mild conditions, we show, for the class of multidimensional optimal stopping problems under consideration, that the first entry time of the stopping region is an optimal stopping time. Further, we prove that the corresponding optimal stopping boundaries can be represented as the unique solution to a nonlinear integral equation. We conclude with an application of our results to the problem of quickest real-time detection of a Markovian drift.