The Spindle of Perfect Knowledge minor artifact grants 5 skill ranks in two random knowledge skills. At least one of these, then, will not be Knowledge(religion), and the rules explicitly allow points gained this way to let you qualify for stuff after 24 hours (just as with a headband of mental superiority). This item, then, will let you access the class early (as early as your 2nd level, in fact).
The trick, of course, is acquiring a minor artifact, even if just for 24 hours, at such a low level. You can force access via the Black Market Connections rogue talent with a good enough Diplomacy check, and you can get access to Black Market Connections via a roll of 26 on the second method of generation for ioun stone resonant powers, but it sounds like getting access is something you'd want to do in backstory and it's unclear how your group is handling that aspect of things. Possibly you can just write the item into and out of your backstory. Possibly you won't be allowed it until the start of play.
Your only other option is to somehow get 5th level spellcasting at level 3, which, as you can imagine, is no small task. It's possible to boost things a bit in various ways, but certainly not with your build. This makes the spindle pretty much your only option.
Objection 1: But it can't give you skill ranks! That's way too good. Don't the rules say you can't get more ranks in a skill than your Hit Dice?
Yes, the general rule for gaining skill ranks and spending skill points limits you to your HD in ranks. No, that doesn't have anything to do with how this item works. Pathfinder is an exception-based system, aka "specific beats general". When the spindle, or anything else, tells you you get skill ranks, that's overriding the general rules for gaining skill ranks. This makes the general rule all but entirely ineffectual. General rules like the limit on having ranks in a skill greater than one's level are generally intended to be descriptive in an exception-based system, rather than prescriptive-- they tell you about how the system works rather than making it work that way. In a strict RAW sense, they often have prescriptive side-effects, but they are more useful in explaining how things are generally supposed to go than anything else.
In any case, this isn't an edge case or anything. The spindle clearly gives you 5 skill ranks in two discrete skills, and in doing so bypasses the general rule on skill ranks. Furthermore, the spindle is a minor artifact. It may look tame, but +5 skill ranks that can exceed your level cap and stack with ranks you already possess is actually a really huge deal, which is appropriate to a minor artifact. The rest of its abilities (a headband of mental superiority +4 and a helm of telepathy) are merely equivalent to an item worth ~500,000 gp. The +5 ranks breaking the game is not "too good" for an item that's supposed to be on par with the deck of many things and the book of infinite spells. It's only a problem because, as a random ioun stone with no immediately shocking or apparently powerful powers at cursory inspection by more novice players, your GM might actually let you have one.
Objection 2: Black Market Connections is a rogue ability. Surely that means it must be terrible and only give you access to items with fixed prices, yes? And that excludes artifacts like the spindle.
No. That's really not how this works. Black Market Connections doesn't care about or affect the prices of any items. It just says that when you go to a settlement there's rarer/more powerful stuff than usual available somewhere in that settlement. The highest level of success specifies that all magic items (which obviously includes the spindle, it being an ioun stone) are available. No price is given, and there's no need for the items to be for sale to the PCs for gold, but some sort of opportunity or availability must be presented to the character if they're looking for one, if the ability is functioning according to its text. It's certainly reasonable to house-rule away (or change the system for) Black Market Connections' unique ability to grant player-driven access to artifacts, but we need to take things at face value when giving optimizaion advice, unless there's reason to do otherwise.
Objection 3: But isn't this like giving a two-handed person three one-handed weapons? That doesn't magically let them use all three. In the same way, the spindle doesn't give you the ability to have the skill ranks it gives you, right?
No. A one-handed weapon grants you no ability to make attacks unless you wield it. If a weapon did specify something like "As long as you have this weapon, you gain the ability to make attacks with it as if you were wielding it in one hand", then you would be able to use it even with two other normal one-handed weapons. No weapons actually do that, for obvious reasons, but they could and the general rule about having to use hands to wield one-handed weapons would not apply.
In fact, the specific text for each weapon is very light. It usually includes details as to what damage the weapon does, what general weapon properties it has, any special rules about the weapon, and a brief description of its construction and/or use. This makes sense! The rules already provide a general framework for how things work so talking about, for example, how making an attack works or how handedness works with a weapon's description is likely to result in that weapon working really weird under the RAW, since those rules would override the general rules wherever they might come into conflict, which might happen in ways the authors didn't expect.
Magic items, however, are much more liberal in terms of general rule violations. The text limiting skill ranks says:
Acquiring Skills
Each level, your character gains a number of skill ranks dependent upon your class plus your Intelligence modifier. Investing a rank in a skill represents a measure of training in that skill. You can never have more ranks in a skill than your total number of Hit Dice. In addition, each class has a number of favored skills, called class skills. It is easier for your character to become more proficient in these skills, as they represent part of his professional training and constant practice. You gain a +3 bonus on all class skills that you put ranks into. If you have more than one class and both grant you a class skill bonus, these bonuses do not stack.
So, there're two things to note here. First of all, the rule isn't talking about methods of gaining skill ranks besides investing skill points. That's because this rule isn't even intended to stop magic items from giving you skill ranks; that's not the point. The point is to make sure you can't get skill ranks from levelling. The second is that "you gain X skill ranks" does clearly contravene this rule from a strict RAW perspective inasmuch as it applies to such effects (which it does in a strict RAW game, but doesn't if we take designer intent into account). That is, the general rule doesn't say something like "if you would gain more skill ranks than this limit from any source, then..." or "when something grants you skill ranks, if they would cause you to have more than this then..." or whatever. It just says you can't have it and the spindle says you do have it, so you do.
Additionally, we can see implications that the designers were aware of the dangers of adding skill ranks from the way other, non-artifact, rank-boosting items are handled. The various int-boosting headbands give you skill ranks instead of the points you'd normally get from that intelligence increase, because they didn't want you taking them off and on again, but that meant to make sure they didn't let you exceed the cap the item needed to specify that these ranks didn't stack with any that you might already possess.
This contrasts with the Spindle of Perfect Knowledge, which also gives you ranks as per such an item, but gives you, in addition, 5 extra ranks without the no-stacking limitation and without any inherent tie to your hit dice.