We present a method to obtain infinitely many examples of pairs (W,D)
consisting of a matrix weight W in one variable and a symmetric second-order
differential operator D. The method is based on a uniform construction of
matrix valued polynomials starting from compact Gelfand pairs (G,K) of rank
one and a suitable irreducible K-representation. The heart of the
construction is the existence of a suitable base change Ψ0. We analyze
the base change and derive several properties. The most important one is that
Ψ0 satisfies a first-order differential equation which enables us to
compute the radial part of the Casimir operator of the group G as soon as we
have an explicit expression for Ψ0. The weight W is also determined
by Ψ0. We provide an algorithm to calculate Ψ0 explicitly. For
the pair (USp(2n),USp(2n−2)×USp(2)) we have
implemented the algorithm in GAP so that individual pairs (W,D) can be
calculated explicitly. Finally we classify the Gelfand pairs (G,K) and the
K-representations that yield pairs (W,D) of size 2×2 and we provide
explicit expressions for most of these cases