In this research work, we investigate the asymptotic behavior of a nonlinear swelling (also called expansive) soil system with a time delay and nonlinear damping of variable exponents. We should note here that swelling soils contain clay minerals that absorb water, which may lead to increases in pressure. In architectural and civil engineering, swelling soils are considered sources of problems and harm. The presence of the delay is used to create more realistic models since many processes depend on past history, and the delays are frequently added by sensors, actuators, and field networks that travel through feedback loops. The appearance of variable exponents in the delay and damping terms in this system allows for a more flexible and accurate modeling of this physical phenomenon. This can lead to more realistic and precise descriptions of the behavior of fluids in different media. In fact, with the advancements of science and technology, many physical and engineering models require more sophisticated mathematical tools to study and understand. The Lebesgue and Sobolev spaces with variable exponents proved to be efficient tools for studying such problems. By constructing a suitable Lyapunov functional, we establish exponential and polynomial decay results. We noticed that the energy decay of the system depends on the value of the variable exponent. These results improve on some existing results in the literature.