Home improvement retailer Lowe's will pay $18 million to settle an environmental lawsuit filed by 32 counties, including Riverside, over the illegal disposal of hazardous wastes, prosecutors announced today.   Riverside County will receive $650,375 under the settlement, according to District Attorney's Office Public Information Officer John Hall. He said the county is home to 10 Lowe's Home Improvement stores and one distribution center.