Two days traveling the Oregon Coast means severely limit stopping and spending any time at the many attractions along the 363-mile coastline. Newport or Yachats make a good first overnight stop to explore some of the amazing scenic areas on the Central Oregon Coast. Top scenic attractions to make time for include Devils Punchbowl, Yaquina Head (Newport area) and the Cape Perpetua Scenic Area (just south of Yachats)
I would spend my second night in Bandon after a stop at the three amazing State Parks on Cape Arago southwest of Coos Bay. The beach at Bandon is decorated with dramatic rock formations and is one of the most scenic beaches of any adjacent to an Oregon Coast town. You could rejoin I-5 via OR 42 E from Bandon, but if you choose to travel further south along the coast, make time for visiting the Cape Blanco Lighthouse and the viewpoints along the Samuel H. Boardman State Scenic Corridor.