Did you rotate the page spread from page attribute?
Rotating the spread view in InDesign is a convenience to allow you to more easily put rotated content into the pages. It does not affect the actual page orientation and the page would export as it is before being rotated.
In order to change orientation you need to change the page size using page tool(press alt key along) or the button in the pages panel.
Check the "Create different page sizes within a document" section at Manage pages and spreads in InDesign