Based on this forum response here How to intersect a raster and vector
You can use the Raster to Polygon tool. Which can result in many shapefile/polygons but in your case may not be an issue
Converts a raster dataset to polygon feature
An alternative is using the Zonal Statistics
Calculates statistics on values of a raster within the zones of another dataset.
Once you have your polyline and polygon, you can use Intersect Tool , specifically the mixed geometry option
Examples: Mixed geometry inputs
Intersect can be used with feature classes of different geometries. The default (and highest allowable) Output Type is the same as the feature class with the lowest dimension geometry.
Polygon and line input for line output
The graphic below illustrates the result of intersecting line and polygon feature classes with the Output Type parameter set to LINE. The output line features are where a line from one of the input feature classes overlaps a polygon from the other input feature class.