Undercoating can be worth the cost depending on several factors. It provides a protective layer to the underside of a vehicle, shielding it from rust, corrosion, and damage caused by road debris, salt, and moisture. This is particularly beneficial in regions with harsh winters or coastal areas where salt exposure is high. 
For new vehicles, undercoating can help maintain the car's resale value by preventing rust-related issues. It can also extend the vehicle's lifespan by protecting critical components like the exhaust system, fuel lines, and brake lines. 
However, for older vehicles, especially those already showing signs of rust, undercoating might not be as effective. It can trap moisture against the metal, potentially accelerating rust if not applied correctly. 
The cost of undercoating varies, typically ranging from $100 to $500, depending on the type of product used and the service provider. DIY kits are available at a lower cost but may not offer the same level of protection as professional applications.
Ultimately, the decision to invest in undercoating should consider the vehicle's age, condition, and the environmental conditions it will face. For those in rust-prone areas or planning to keep their vehicle for an extended period, undercoating can be a worthwhile investment. For others, especially with older vehicles or in milder climates, the cost may outweigh the benefits.