He had been being taught how to ride a bike.
That is an incredibly awkward phrase but I don't think it's grammatically inconsistent.
That said, why would you need to say that anyway? "He was being taught how to ride a bike" doesn't make an English speaker's ears bleed. There are probably things that English has that Farsi lacks, and there are things that English lacks that Farsi has. Learning to communicate in a new language is partly learning to fit the things you want to say to the way the other language likes to say things. No English speaker I know would ever use the passive form for perfect continuous tenses, even though I'm pretty sure we can express every mood and tense known to man, if we so want.
There's a concept in programming called "turing completeness". The basic idea is that a language is "turing complete" if you can use it to do anything it's possible to do with a program, however difficultly. The equivalent doesn't exist for natural languages, but for fun, let's call it linguistic completeness. A language is linguistically complete if it can express every concept it is possible to express, however difficultly. With that being said, I've never heard of a real, spoken language that is not linguistically complete.