Structures with inhomogeneous materials, non-uniform cross-sections, non-uniform supports, and subject to non-uniform loads are increasingly common in aerospace applications. This paper presents a simple and unified numerical dynamics model for all beams with arbitrarily axially varying cross-sections, materials, foundations, loads, and general boundary conditions. These spatially varying properties are all approximated by high-order Chebyshev expansions, and discretized by Gauss–Lobatto sampling. The discrete governing equation of non-uniform axially functionally graded beams resting on variable Winkler–Pasternak foundations subjected to non-uniformly distributed loads is derived based on the Euler–Bernoulli beam theory. A projection matrix method is employed to simultaneously assemble spectral elements and impose general boundary conditions. Numerical experiments are performed to validate the proposed method, considering different inhomogeneous materials, boundary conditions, foundations, cross-sections, and loads. The results are compared with those reported in the literature and obtained by the finite element method, and excellent agreement is observed. The convergence, accuracy, and efficiency of the proposed method are demonstrated.