Adam is correct that it is rarely a problem to find spare parts for discontinued bikes. Most of the items you'd need to replace, like the chain and cassette, are standard items produced by big manufacturers. There are some possible exceptions, but they tend to be minor.
The rear derailer bolts onto an item called the derailer hanger. Almost all derailer hangars are made of aluminum, and are replaceable. If you crash, you could bend the hangar and affect your shifting - and you would generally replace the hangar rather than bend it back (steel hangars can be bent back safely). Orbea is likely to keep stocking derailer hangars for some time, and a dealer would be able to order a replacement. Alternatively, Wheels Manufacturing makes replacement hangars for many bikes. For example, I believe this one should fit the bike in question. Wheels' site has a derailer hangar lookup system for you to be sure. There may be other third-party manufacturers, Wheels is just the one I'm aware of. An Orbea dealer is likely to have more specific advice on the best course of action. If you don't live near an Orbea dealer, any bike store might be able to help. I wouldn't be that concerned about this issue, but it is something to be aware of.
I can't tell for certain what bottom bracket standard that bike uses. It may be a pretty common standard known as PF86. In theory, if a manufacturer uses a proprietary standard, it's possible that at some point they will cease to support it, or go out of business, or that replacement parts might be harder to find. You can read one reader's saga with a Wilier frame that used a proprietary standard that they later discontinued; he tried to change his cranks, and he is still having trouble finding the right equipment. Chances are that's not the case with Orbea. It's possible that bottom bracket shell specifications will change and that PF86 will go extinct at some point in the future. If this happens, it could be hard to source replacement equipment as well. By the time this happens (if it does!), chances are good that you'll be ready for a new bike. I wouldn't worry about this issue.
I can't tell if the bike in question has disc brakes. One listing for an Avant was a disc brake bike, and it described the calipers as a proprietary Orbea brand. Chances are that caliper was made by a big manufacturer (e.g. Tektro) and rebranded. So, chances are decent that you should be able to find a pad that fits when the pads wear out, but it might take some searching. In the worst case, disc brake mounting systems are standardized, so you could replace the calipers wholesale. If the bike in question has rim brakes, this isn't a concern at all. Chances are very good that the bike can take Shimano-style brake pads, and that you can replace them.
(While we usually deprecate product recommendations, many stock pads for lower end rim brakes aren't very good. Many riders will do well to replace them with Kool Stop pads, or find stock Shimano or SRAM pads that fit the holders.)