Rising costs, slowing tax revenue and a sluggish economy have saddled some of Texas’ biggest cities with multimillion-dollar deficits.