While you should select a backpack for fit rather than its suitability for carry-on, most backpacks in the 30 to 50 litre size that are commonly used on the Camino can be compressed down to normal carry-on size, especially if you transfer some of your stuff to a small daypack that will fit under the seat. My main pack was an Osprey Kestrel 38, which theoretically exceeded the maximum carry-on length, so I put a bunch of stuff in this little roll-up daypack
http://www.walmart.com/ip/Outdoor-Products-Packable-Day-Pack/26700608 and the larger Kestrel was not questioned. The little daypack comes in other colors than the purple shown in the link if that's an issue, and rolls up into a ball about the size of a large orange. It comes in handy on the Camino to carry raingear or groceries if you're playing tourist or grocery shopping in the towns along the way.